Commit 482bab16 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to log creating resource

parent 7aa9137a
......@@ -43,6 +43,7 @@ Akonadi::Collection::Id ImportAddressbookJobInterfaceTestImpl::convertFolderPath
QString ImportAddressbookJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
mLogCreateResource->logCreateResource(resources, name, settings, synchronizeTree);
//TODO
return {};
}
......
......@@ -21,10 +21,11 @@
#define IMPORTADDRESSBOOKJOBINTERFACETEST_H
#include <QObject>
#include "exportimportutil.h"
#include "addressbook/importaddressbookjobinterface.h"
class ImportAddressbookJobInterfaceTestImpl : public ImportAddressbookJobInterface
class ImportAddressbookJobInterfaceTestImpl : public ImportAddressbookJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
......
......@@ -43,6 +43,7 @@ Akonadi::Collection::Id ImportAlarmJobInterfaceTestImpl::convertFolderPathToColl
QString ImportAlarmJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
mLogCreateResource->logCreateResource(resources, name, settings, synchronizeTree);
//TODO
return {};
}
......
......@@ -21,10 +21,11 @@
#define IMPORTALARMJOBINTERFACETEST_H
#include <QObject>
#include "exportimportutil.h"
#include "alarm/importalarmjobinterface.h"
class ImportAlarmJobInterfaceTestImpl : public ImportAlarmJobInterface
class ImportAlarmJobInterfaceTestImpl : public ImportAlarmJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
......
......@@ -43,6 +43,7 @@ Akonadi::Collection::Id ImportCalendarJobInterfaceTestImpl::convertFolderPathToC
QString ImportCalendarJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
mLogCreateResource->logCreateResource(resources, name, settings, synchronizeTree);
//TODO
return {};
}
......
......@@ -21,10 +21,11 @@
#define IMPORTCALENDARJOBINTERFACETEST_H
#include <QObject>
#include "exportimportutil.h"
#include "calendar/importcalendarjobinterface.h"
class ImportCalendarJobInterfaceTestImpl : public ImportCalendarJobInterface
class ImportCalendarJobInterfaceTestImpl : public ImportCalendarJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
......
......@@ -34,7 +34,7 @@ public:
QVector<Utils::AkonadiInstanceInfo> mListAkonadiInstanceInfo;
QString mPathConfig;
private:
protected:
LogCreatingResource *mLogCreateResource = nullptr;
};
......
......@@ -41,3 +41,8 @@ QString LogCreatingResource::logPath() const
{
return mTmpLogFile->fileName();
}
void LogCreatingResource::logCreateResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
}
......@@ -30,6 +30,7 @@ public:
~LogCreatingResource();
void appendText(const QString &str);
Q_REQUIRED_RESULT QString logPath() const;
void logCreateResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree);
private:
QTemporaryFile *mTmpLogFile = nullptr;
};
......
......@@ -50,6 +50,7 @@ void ImportMailJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)
{
mLogCreateResource->logCreateResource(resources, name, settings, false);
qDebug() << " QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)" << resources << " name " << name << " settings " << settings;
//TODO
return {};
......
......@@ -21,10 +21,11 @@
#define IMPORTMAILJOBINTERFACETEST_H
#include <QObject>
#include "exportimportutil.h"
#include "mail/importmailjobinterface.h"
class ImportMailJobInterfaceTestImpl : public ImportMailJobInterface
class ImportMailJobInterfaceTestImpl : public ImportMailJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
......
......@@ -44,8 +44,8 @@ Akonadi::Collection::Id ImportNotesJobInterfaceTestImpl::convertFolderPathToColl
QString ImportNotesJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
qDebug() << " QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)" << resources << " name " << name << " settings " << settings;
mLogCreateResource->logCreateResource(resources, name, settings, synchronizeTree);
qDebug() << " QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)" << resources << " name " << name << " settings " << settings;
//TODO
return {};
}
......
......@@ -21,10 +21,11 @@
#define IMPORTNOTESJOBINTERFACETEST_H
#include <QObject>
#include "exportimportutil.h"
#include "notes/importnotesjobinterface.h"
class ImportNotesJobInterfaceTestImpl : public ImportNotesJobInterface
class ImportNotesJobInterfaceTestImpl : public ImportNotesJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
......
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