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

Use logSynchronizeResource

parent 7090c4de
...@@ -50,8 +50,8 @@ QString ImportAddressbookJobInterfaceTestImpl::createResource(const QString &res ...@@ -50,8 +50,8 @@ QString ImportAddressbookJobInterfaceTestImpl::createResource(const QString &res
void ImportAddressbookJobInterfaceTestImpl::synchronizeResource(const QStringList &lst) void ImportAddressbookJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{ {
mLogCreateResource->logSynchronizeResource(lst);
slotNextStep(); slotNextStep();
//TODO
} }
ImportAddressbookJobInterfaceTest::ImportAddressbookJobInterfaceTest(QObject *parent) ImportAddressbookJobInterfaceTest::ImportAddressbookJobInterfaceTest(QObject *parent)
......
...@@ -50,8 +50,8 @@ QString ImportAlarmJobInterfaceTestImpl::createResource(const QString &resources ...@@ -50,8 +50,8 @@ QString ImportAlarmJobInterfaceTestImpl::createResource(const QString &resources
void ImportAlarmJobInterfaceTestImpl::synchronizeResource(const QStringList &lst) void ImportAlarmJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{ {
mLogCreateResource->logSynchronizeResource(lst);
slotNextStep(); slotNextStep();
//TODO
} }
ImportAlarmJobInterfaceTest::ImportAlarmJobInterfaceTest(QObject *parent) ImportAlarmJobInterfaceTest::ImportAlarmJobInterfaceTest(QObject *parent)
......
...@@ -50,7 +50,8 @@ QString ImportCalendarJobInterfaceTestImpl::createResource(const QString &resour ...@@ -50,7 +50,8 @@ QString ImportCalendarJobInterfaceTestImpl::createResource(const QString &resour
void ImportCalendarJobInterfaceTestImpl::synchronizeResource(const QStringList &lst) void ImportCalendarJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{ {
//TODO mLogCreateResource->logSynchronizeResource(lst);
slotNextStep();
} }
ImportCalendarJobInterfaceTest::ImportCalendarJobInterfaceTest(QObject *parent) ImportCalendarJobInterfaceTest::ImportCalendarJobInterfaceTest(QObject *parent)
......
...@@ -39,6 +39,13 @@ void LogCreatingResource::appendText(const QString &str) ...@@ -39,6 +39,13 @@ void LogCreatingResource::appendText(const QString &str)
//TODO //TODO
} }
void LogCreatingResource::logSynchronizeResource(const QStringList &lst)
{
if (lst.isEmpty()) {
appendText(lst.join(QLatin1Char('\n')));
}
}
QString LogCreatingResource::logPath() const QString LogCreatingResource::logPath() const
{ {
return mTmpLogFile->fileName(); return mTmpLogFile->fileName();
......
...@@ -31,6 +31,7 @@ public: ...@@ -31,6 +31,7 @@ public:
void appendText(const QString &str); void appendText(const QString &str);
Q_REQUIRED_RESULT QString logPath() const; Q_REQUIRED_RESULT QString logPath() const;
void logCreateResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree); void logCreateResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree);
void logSynchronizeResource(const QStringList &lst);
private: private:
QTemporaryFile *mTmpLogFile = nullptr; QTemporaryFile *mTmpLogFile = nullptr;
}; };
......
...@@ -43,7 +43,7 @@ Akonadi::Collection::Id ImportMailJobInterfaceTestImpl::convertFolderPathToColle ...@@ -43,7 +43,7 @@ Akonadi::Collection::Id ImportMailJobInterfaceTestImpl::convertFolderPathToColle
void ImportMailJobInterfaceTestImpl::synchronizeResource(const QStringList &lst) void ImportMailJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{ {
qDebug() << " void ImportMailJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)" << lst; mLogCreateResource->logSynchronizeResource(lst);
slotNextStep(); slotNextStep();
//TODO //TODO
} }
......
...@@ -52,9 +52,7 @@ QString ImportNotesJobInterfaceTestImpl::createResource(const QString &resources ...@@ -52,9 +52,7 @@ QString ImportNotesJobInterfaceTestImpl::createResource(const QString &resources
void ImportNotesJobInterfaceTestImpl::synchronizeResource(const QStringList &lst) void ImportNotesJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{ {
//TODO log it! mLogCreateResource->logSynchronizeResource(lst);
qDebug() << " void ImportNotesJobInterfaceTestImpl::synchronizeResource(const QStringList &lst) TODO IMPLEMENT" << lst;
mLogCreateResource->appendText(lst.join(QLatin1Char('\n')));
slotNextStep(); slotNextStep();
} }
......
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