Commit 831532a8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make createResource as virtual

parent 4fad6f24
......@@ -377,8 +377,7 @@ QStringList AbstractImportExportJob::restoreResourceFile(const QString &resource
addSpecificResourceSettings(resourceConfig, resourceBaseName, settings);
//FIXME
const QString newResource = mCreateResource->createResource(resourceBaseName, filename, settings);
const QString newResource = createResource(resourceBaseName, filename, settings);
infoAboutNewResource(newResource);
resourceToSync << newResource;
qCDebug(PIMDATAEXPORTERCORE_LOG) << " newResource" << newResource;
......
......@@ -115,6 +115,7 @@ protected:
void convertRealPathToCollectionList(KConfigGroup &group, const QString &currentKey, bool addCollectionPrefix = true);
virtual Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) = 0;
virtual QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) = 0;
virtual Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) = 0;
QHash<QString, Akonadi::Collection::Id> mHashConvertPathCollectionId;
QVector<ResourceFiles> mListResourceFile;
......
......@@ -94,3 +94,9 @@ QString ExportAddressbookJobInterfaceImpl::adaptNewResourceUrl(bool overwriteRes
ResourceConverterImpl converter;
return converter.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportAddressbookJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
......@@ -40,6 +40,8 @@ protected:
Q_REQUIRED_RESULT QString resourcePath(const QString &agentIdentifier, const QString &defaultPath) const override;
void backupAddressBookResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
#endif // EXPORTADDRESSBOOKINTERFACEIMPL_H
......@@ -37,7 +37,6 @@ public:
protected:
void slotNextStep() override;
virtual void synchronizeResource(const QStringList &lst) = 0;
virtual Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) = 0;
virtual Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) = 0;
void restoreResources();
......
......@@ -35,7 +35,7 @@ public:
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
};
......
......@@ -59,6 +59,12 @@ QString ExportAkregatorJobInterface::adaptNewResourceUrl(bool overwriteResources
return {};
}
QString ExportAkregatorJobInterface::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
return {};
}
void ExportAkregatorJobInterface::slotCheckBackupConfig()
{
increaseProgressDialog();
......@@ -91,3 +97,4 @@ void ExportAkregatorJobInterface::slotCheckBackupData()
}
Q_EMIT jobFinished();
}
......@@ -35,9 +35,11 @@ public:
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
private:
void slotCheckBackupConfig();
void slotCheckBackupData();
};
#endif // EXPORTAKREGATORJOBINTERFACE_H
......@@ -54,6 +54,11 @@ Akonadi::Collection::Id ImportAkregatorJobInterface::convertFolderPathToCollecti
return -1;
}
QString ImportAkregatorJobInterface::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
return {};
}
QString ImportAkregatorJobInterface::adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath)
{
//Unused
......@@ -104,3 +109,5 @@ void ImportAkregatorJobInterface::restoreData()
Q_EMIT info(i18n("Data restored."));
QTimer::singleShot(0, this, &ImportAkregatorJobInterface::slotNextStep);
}
......@@ -36,6 +36,7 @@ public:
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
private:
void slotNextStep() override;
......
......@@ -82,3 +82,10 @@ QString ExportAlarmJobInterfaceImpl::adaptNewResourceUrl(bool overwriteResources
ResourceConverterImpl converter;
return converter.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportAlarmJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
......@@ -39,6 +39,7 @@ protected:
Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const override;
void backupAlarmResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
#endif // EXPORTALARMJOBINTERFACEIMPL_H
......@@ -36,7 +36,6 @@ public:
protected:
void slotNextStep() override;
virtual void synchronizeResource(const QStringList &lst) = 0;
virtual Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) = 0;
virtual Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) = 0;
void restoreResources();
......
......@@ -35,7 +35,7 @@ protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
};
......
......@@ -79,6 +79,12 @@ QString ExportAddressbookJobInterfaceTestImpl::adaptNewResourceUrl(bool overwrit
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportAddressbookJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
QString ExportAddressbookJobInterfaceTestImpl::resourcePath(const QString &agentIdentifier, const QString &defaultPath) const
{
ResourceConverterTest converter;
......
......@@ -40,6 +40,8 @@ protected:
Q_REQUIRED_RESULT QString resourcePath(const QString &agentIdentifier, const QString &defaultPath = QString()) const override;
void backupAddressBookResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
class ExportAddressbookJobInterfaceTest : public QObject
......
......@@ -34,7 +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) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
......
......@@ -42,6 +42,12 @@ QString ExportAkregatorJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteR
return {};
}
QString ExportAkregatorJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
ExportAkregatorJobInterfaceTest::ExportAkregatorJobInterfaceTest(QObject *parent)
: QObject(parent)
{
......
......@@ -32,6 +32,8 @@ public:
~ExportAkregatorJobInterfaceTestImpl();
protected:
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
class ExportAkregatorJobInterfaceTest : public QObject
......
......@@ -85,6 +85,12 @@ QString ExportAlarmJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResou
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportAlarmJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
ExportAlarmJobInterfaceTest::ExportAlarmJobInterfaceTest(QObject *parent)
: QObject(parent)
{
......
......@@ -38,6 +38,7 @@ protected:
Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const override;
void backupAlarmResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
class ExportAlarmJobInterfaceTest : public QObject
......
......@@ -34,7 +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) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
......
......@@ -98,6 +98,12 @@ QString ExportCalendarsJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteR
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportCalendarsJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
ExportCalendarsJobInterfaceTest::ExportCalendarsJobInterfaceTest(QObject *parent)
: QObject(parent)
{
......
......@@ -40,6 +40,8 @@ protected:
Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const override;
void backupCalendarResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
class ExportCalendarsJobInterfaceTest : public QObject
......
......@@ -34,7 +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) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
......
......@@ -126,6 +126,12 @@ QString ExportMailJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResour
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
ExportMailJobInterfaceTest::ExportMailJobInterfaceTest(QObject *parent)
: QObject(parent)
{
......
......@@ -49,6 +49,8 @@ protected:
Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const override;
void backupMailResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
class ExportMailJobInterfaceTest : public QObject
......
......@@ -50,9 +50,9 @@ void ImportMailJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
//TODO
}
QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)
QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
mLogCreateResource->logCreateResource(resources, name, settings, false);
mLogCreateResource->logCreateResource(resources, name, settings, synchronizeTree);
qDebug() << " QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)" << resources << " name " << name << " settings " << settings;
//TODO
return {};
......
......@@ -36,7 +36,7 @@ protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
void registerSpecialCollection(Akonadi::SpecialMailCollections::Type type, qint64 colId) override;
void importFilters(const QVector<MailCommon::MailFilter *> &filters) override;
......
......@@ -80,6 +80,12 @@ QString ExportNotesJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResou
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportNotesJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
ExportNotesJobInterfaceTest::ExportNotesJobInterfaceTest(QObject *parent)
: QObject(parent)
{
......
......@@ -39,6 +39,7 @@ protected:
Q_REQUIRED_RESULT QVector<Utils::AkonadiInstanceInfo> listOfResource() override;
Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
class ExportNotesJobInterfaceTest : public QObject
......
......@@ -34,7 +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) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
......
......@@ -97,3 +97,9 @@ QString ExportCalendarJobInterfaceImpl::adaptNewResourceUrl(bool overwriteResour
ResourceConverterImpl converter;
return converter.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportCalendarJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
......@@ -40,6 +40,7 @@ protected:
Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const override;
void backupCalendarResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
#endif // EXPORTCALENDARJOBINTERFACEIMPL_H
......@@ -36,7 +36,6 @@ public:
protected:
void slotNextStep() override;
virtual Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) = 0;
virtual void synchronizeResource(const QStringList &lst) = 0;
virtual Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) = 0;
......
......@@ -35,7 +35,7 @@ protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
};
......
......@@ -133,3 +133,10 @@ QString ExportMailJobInterfaceImpl::adaptNewResourceUrl(bool overwriteResources,
return converter.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportMailJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
......@@ -47,6 +47,7 @@ protected:
Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const override;
void backupMailResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
#endif // ExportMailJob_H
......@@ -54,7 +54,6 @@ protected:
virtual void restoreMails();
void restoreResources();
virtual Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) = 0;
virtual Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings) = 0;
virtual void registerSpecialCollection(Akonadi::SpecialMailCollections::Type type, qint64 colId) = 0;
virtual void synchronizeResource(const QStringList &lst) = 0;
virtual void importFilters(const QVector<MailCommon::MailFilter *> &filters) = 0;
......
......@@ -52,9 +52,9 @@ void ImportMailJobInterfaceImpl::registerSpecialCollection(Akonadi::SpecialMailC
});
}
QString ImportMailJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)
QString ImportMailJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
return mCreateResource->createResource(resources, name, settings);
return mCreateResource->createResource(resources, name, settings, synchronizeTree);
}
void ImportMailJobInterfaceImpl::synchronizeResource(const QStringList &lst)
......
......@@ -41,7 +41,7 @@ public:
~ImportMailJobInterfaceImpl() override;
protected:
void registerSpecialCollection(Akonadi::SpecialMailCollections::Type type, qint64 colId) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
void synchronizeResource(const QStringList &lst) override;
void importFilters(const QVector<MailCommon::MailFilter *> &filters) override;
......
......@@ -82,3 +82,10 @@ QString ExportNotesJobInterfaceImpl::adaptNewResourceUrl(bool overwriteResources
ResourceConverterImpl converter;
return converter.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportNotesJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
......@@ -38,6 +38,7 @@ protected:
Q_REQUIRED_RESULT QVector<Utils::AkonadiInstanceInfo> listOfResource() override;
Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
#endif // EXPORTNOTESJOBINTERFACE_H
......@@ -33,7 +33,6 @@ public:
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;
virtual void synchronizeResource(const QStringList &lst) = 0;
virtual Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) = 0;
void slotNextStep() 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