Commit a40f7f12 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix generate correct log

parent c70758c7
......@@ -38,11 +38,12 @@ void LogCreatingResource::appendText(const QString &str)
{
QTextStream stream(mTmpLogFile);
stream << str << '\n';
stream << "--------------------------\n";
}
void LogCreatingResource::logSynchronizeResource(const QStringList &lst)
{
if (lst.isEmpty()) {
if (!lst.isEmpty()) {
appendText(lst.join(QLatin1Char('\n')));
}
}
......@@ -63,6 +64,6 @@ QString LogCreatingResource::logCreateResource(const QString &resources, const Q
stream << i.key() << ' ' << i.value().toString() << '\n';
}
stream << synchronizeTree << '\n';
qDebug() << "settings "<< settings;
return resources + QStringLiteral("new_resource1");
stream << "--------------------------\n";
return resources + QStringLiteral("_new_resource_") + QString::number(mResourceIndex++);
}
......@@ -34,6 +34,7 @@ public:
void logSynchronizeResource(const QStringList &lst);
private:
QTemporaryFile *mTmpLogFile = nullptr;
int mResourceIndex = 0;
};
#endif // LOGCREATINGRESOURCE_H
......@@ -2,7 +2,12 @@ akonadi_akonotes_resource
Notes
Path /tmp/backupnote//0/
1
--------------------------
akonadi_akonotes_resource
Notes2
Path /tmp/backupnote//1/
1
--------------------------
akonadi_akonotes_resource_new_resource_0
akonadi_akonotes_resource_new_resource_1
--------------------------
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment