Commit 7281dfc7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

add more virtual method

parent 49525ef1
......@@ -46,6 +46,12 @@ Akonadi::Collection::Id ImportNotesJobInterfaceTestImpl::convertFolderPathToColl
return resourceConverterTest.convertFolderPathToCollectionId(path);
}
QString ImportNotesJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
//TODO
return {};
}
ImportNotesJobInterfaceTest::ImportNotesJobInterfaceTest(QObject *parent)
: QObject(parent)
{
......
......@@ -33,6 +33,7 @@ public:
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
private:
void restoreResources() override;
......
......@@ -32,7 +32,8 @@ public:
~ImportNotesJobInterface() override;
void start() override;
protected:
virtual Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) = 0;
private:
void slotNextStep() override;
private:
......
......@@ -100,7 +100,7 @@ void ImportNotesJobInterfaceImpl::restoreResources()
}
}
const QString newResource = mCreateResource->createResource(QStringLiteral("akonadi_akonotes_resource"), filename, settings, true);
const QString newResource = createResource(QStringLiteral("akonadi_akonotes_resource"), filename, settings, true);
infoAboutNewResource(newResource);
qCDebug(PIMDATAEXPORTERCORE_LOG) << " newResource" << newResource;
listResource << newResource;
......@@ -117,3 +117,8 @@ Akonadi::Collection::Id ImportNotesJobInterfaceImpl::convertFolderPathToCollecti
ResourceConverterImpl converter;
return converter.convertFolderPathToCollectionId(path);
}
QString ImportNotesJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
return mCreateResource->createResource(resources, name, settings, synchronizeTree);
}
......@@ -34,6 +34,7 @@ public:
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
private:
void restoreResources() override;
};
......
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