Commit 91f28e4f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

make new virtual method

parent a5db5430
......@@ -64,6 +64,12 @@ Akonadi::Collection::Id ExportMailJobInterfaceTestImpl::convertFolderPathToColle
return resourceConverterTest.convertFolderPathToCollectionId(path);
}
QVector<MailCommon::MailFilter *> ExportMailJobInterfaceTestImpl::filters()
{
//TODO implement it
return {};
}
void ExportMailJobInterfaceTestImpl::backupResources()
{
qDebug() << " not implement yet";
......
......@@ -42,6 +42,8 @@ protected:
void backupResources() override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QVector<MailCommon::MailFilter *> filters() override;
};
class ExportMailJobInterfaceTest : public QObject
......
......@@ -21,7 +21,6 @@
#include "importexportmailutil.h"
#include <MailCommon/MailUtil>
#include <MailCommon/FilterManager>
#include <MailCommon/FilterImporterExporter>
#include "importexportprogressindicatorbase.h"
#include "exportresourcearchivejob.h"
......@@ -170,7 +169,7 @@ void ExportMailJobInterface::backupConfig()
{
setProgressDialogLabel(i18n("Backing up config..."));
QVector<MailCommon::MailFilter *> lstFilter = MailCommon::FilterManager::instance()->filters();
QVector<MailCommon::MailFilter *> lstFilter = filters();
if (!lstFilter.isEmpty()) {
QTemporaryFile tmp;
tmp.open();
......
......@@ -25,6 +25,9 @@
#include <KSharedConfig>
#include <QDateTime>
#include <time.h>
namespace MailCommon {
class MailFilter;
}
class ArchiveStorage;
class PIMDATAEXPORTER_TESTS_EXPORT ExportMailJobInterface : public AbstractImportExportJob
......@@ -45,6 +48,7 @@ protected:
virtual void convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey) = 0;
virtual void exportArchiveResource() = 0;
virtual void backupResources() = 0;
virtual QVector<MailCommon::MailFilter *> filters() = 0;
void slotCheckBackupResources();
private:
void slotCheckBackupIdentity();
......
......@@ -21,6 +21,7 @@
#include "importexportmailutil.h"
#include <MailCommon/MailUtil>
#include <MailCommon/FilterManager>
#include <KMime/Message>
#include "importexportprogressindicatorbase.h"
......@@ -178,3 +179,9 @@ void ExportMailJobInterfaceImpl::convertCollectionListToRealPath(KConfigGroup &g
ResourceConverterImpl converter;
converter.convertCollectionListToRealPath(group, currentKey);
}
QVector<MailCommon::MailFilter *> ExportMailJobInterfaceImpl::filters()
{
return MailCommon::FilterManager::instance()->filters();
}
......@@ -41,6 +41,7 @@ protected:
void exportArchiveResource() override;
void backupResources() override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QVector<MailCommon::MailFilter *> filters() override;
private:
void slotCheckBackupMails();
void slotWriteNextArchiveResource();
......@@ -48,6 +49,7 @@ private:
QDateTime mArchiveTime = QDateTime::currentDateTime();
int mIndexIdentifier = 0;
};
#endif // ExportMailJob_H
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