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

Make method virtual pure

parent fdc436fd
......@@ -258,12 +258,6 @@ Akonadi::Collection::Id AbstractImportExportJob::convertPathToId(const QString &
return id;
}
//Allow to remove dependancy against MailCommon::Util
Akonadi::Collection::Id AbstractImportExportJob::convertFolderPathToCollectionId(const QString &path)
{
return MailCommon::Util::convertFolderPathToCollectionId(path);
}
void AbstractImportExportJob::initializeImportJob()
{
if (mTempDir) {
......
......@@ -127,7 +127,7 @@ protected:
void convertCollectionListStrToAkonadiId(const KSharedConfig::Ptr &config, const QString &groupName, const QString &key, bool addCollectionPrefix);
void convertRealPathToCollectionList(KConfigGroup &group, const QString &currentKey, bool addCollectionPrefix = true);
virtual Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path);
virtual Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) = 0;
private:
void slotAllResourceSynchronized();
void slotSynchronizeInstanceDone(const QString &, const QString &identifier);
......
......@@ -21,7 +21,7 @@
#include "exportresourcearchivejob.h"
#include <AkonadiCore/AgentManager>
#include <MailCommon/MailUtil>
#include <KLocalizedString>
#include <QTemporaryFile>
......@@ -111,3 +111,8 @@ void ExportAddressbookJobInterfaceImpl::convertCollectionListToRealPath(KConfigG
ResourceConverterImpl converter;
converter.convertCollectionListToRealPath(group, currentKey);
}
Akonadi::Collection::Id ExportAddressbookJobInterfaceImpl::convertFolderPathToCollectionId(const QString &path)
{
return MailCommon::Util::convertFolderPathToCollectionId(path);
}
......@@ -35,6 +35,7 @@ protected:
void exportArchiveResource() override;
void convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey) override;
void convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey) override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
private:
void slotWriteNextArchiveResource();
void slotAddressbookJobTerminated();
......
......@@ -19,7 +19,7 @@
#include "importaddressbookjobinterfaceimpl.h"
#include "archivestorage.h"
#include <MailCommon/MailUtil>
#include <PimCommonAkonadi/CreateResource>
#include <KLocalizedString>
......@@ -124,3 +124,8 @@ void ImportAddressbookJobInterfaceImpl::restoreResources()
//It's maildir support. Need to add support
startSynchronizeResources(listResource);
}
Akonadi::Collection::Id ImportAddressbookJobInterfaceImpl::convertFolderPathToCollectionId(const QString &path)
{
return MailCommon::Util::convertFolderPathToCollectionId(path);
}
......@@ -34,6 +34,7 @@ public:
protected:
void restoreResources() override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
};
#endif // IMPORTADDRESSBOOKJOBINTERFACEIMPL_H
......@@ -18,7 +18,7 @@
*/
#include "exportakregatorjobinterface.h"
#include <MailCommon/MailUtil>
#include <AkonadiCore/AgentManager>
#include <KLocalizedString>
#include <KZip>
......@@ -49,6 +49,11 @@ void ExportAkregatorJobInterface::start()
}
}
Akonadi::Collection::Id ExportAkregatorJobInterface::convertFolderPathToCollectionId(const QString &path)
{
return MailCommon::Util::convertFolderPathToCollectionId(path);
}
void ExportAkregatorJobInterface::slotCheckBackupConfig()
{
increaseProgressDialog();
......
......@@ -32,7 +32,8 @@ public:
~ExportAkregatorJobInterface() override;
void start() override;
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
private:
void slotCheckBackupConfig();
void slotCheckBackupData();
......
......@@ -20,6 +20,7 @@
#include "importakregatorjobinterface.h"
#include "archivestorage.h"
#include <MailCommon/MailUtil>
#include <PimCommonAkonadi/CreateResource>
#include <KArchive>
......@@ -48,6 +49,11 @@ void ImportAkregatorJobInterface::start()
QTimer::singleShot(0, this, &ImportAkregatorJobInterface::slotNextStep);
}
Akonadi::Collection::Id ImportAkregatorJobInterface::convertFolderPathToCollectionId(const QString &path)
{
return MailCommon::Util::convertFolderPathToCollectionId(path);
}
void ImportAkregatorJobInterface::slotNextStep()
{
++mIndex;
......
......@@ -33,6 +33,9 @@ public:
void start() override;
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
private:
void slotNextStep() override;
......
......@@ -22,6 +22,7 @@
#include <AkonadiCore/AgentManager>
#include <KLocalizedString>
#include <MailCommon/MailUtil>
#include <QTemporaryFile>
#include <QTimer>
......@@ -100,3 +101,8 @@ void ExportAlarmJobInterfaceImpl::exportArchiveResource()
{
QTimer::singleShot(0, this, &ExportAlarmJobInterfaceImpl::slotWriteNextArchiveResource);
}
Akonadi::Collection::Id ExportAlarmJobInterfaceImpl::convertFolderPathToCollectionId(const QString &path)
{
return MailCommon::Util::convertFolderPathToCollectionId(path);
}
......@@ -33,6 +33,7 @@ public:
protected:
void exportArchiveResource() override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
private:
void slotAlarmJobTerminated();
......
......@@ -21,6 +21,7 @@
#include "archivestorage.h"
#include <PimCommonAkonadi/CreateResource>
#include <MailCommon/MailUtil>
#include <KArchive>
#include <KLocalizedString>
......@@ -115,3 +116,8 @@ void ImportAlarmJobInterfaceImpl::restoreResources()
//It's maildir support. Need to add support
startSynchronizeResources(listResource);
}
Akonadi::Collection::Id ImportAlarmJobInterfaceImpl::convertFolderPathToCollectionId(const QString &path)
{
return MailCommon::Util::convertFolderPathToCollectionId(path);
}
......@@ -32,6 +32,7 @@ public:
~ImportAlarmJobInterfaceImpl() override;
protected:
void restoreResources() override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
};
#endif // IMPORTALARMJOBINTERFACEIMPL_H
......@@ -86,3 +86,10 @@ void ExportAddressbookJobInterfaceTest::exportAddressBookConfigTest1()
compareExportFile.setListFilePath(QStringLiteral(PIMDATAEXPORTER_DIR "/export/test1"));
compareExportFile.compareFiles();
}
Akonadi::Collection::Id ExportAddressbookJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path)
{
//TODO
return -1;
}
......@@ -37,6 +37,7 @@ protected:
protected:
void convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey) override;
void convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey) override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
};
class ExportAddressbookJobInterfaceTest : public QObject
......
......@@ -75,3 +75,10 @@ void ExportAlarmJobInterfaceTest::exportAlarmConfigTest1()
compareExportFile.setListFilePath(QStringLiteral(PIMDATAEXPORTER_DIR "/export/test1"));
compareExportFile.compareFiles();
}
Akonadi::Collection::Id ExportAlarmJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path)
{
//TODO
return -1;
}
......@@ -33,6 +33,7 @@ public:
protected:
void exportArchiveResource() override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
};
class ExportAlarmJobInterfaceTest : public QObject
......
......@@ -75,3 +75,10 @@ void ExportCalendarsJobInterfaceTest::exportCalendarConfigTest1()
compareExportFile.setListFilePath(QStringLiteral(PIMDATAEXPORTER_DIR "/export/test1"));
compareExportFile.compareFiles();
}
Akonadi::Collection::Id ExportCalendarsJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path)
{
//TODO
return -1;
}
......@@ -33,6 +33,7 @@ public:
protected:
void exportArchiveResource() override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
};
class ExportCalendarsJobInterfaceTest : public QObject
......
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