Commit 328f5c2c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

KIdentityManagement::IdentityManager is only for importmailjobinterfaceimpl

parent 792b4d44
......@@ -27,7 +27,7 @@
#include <PimCommonAkonadi/CreateResource>
#include <AkonadiCore/AgentInstance>
#include <KIdentityManagement/kidentitymanagement/identitymanager.h>
#include <KZip>
#include <QTemporaryDir>
#include <KLocalizedString>
......@@ -38,6 +38,7 @@
#include <QDir>
#include <QStandardPaths>
#include <QCoreApplication>
#include <KConfigGroup>
int AbstractImportExportJob::sArchiveVersion = -1;
......@@ -45,7 +46,6 @@ AbstractImportExportJob::AbstractImportExportJob(QObject *parent, ArchiveStorage
: QObject(parent)
, mTypeSelected(typeSelected)
, mArchiveStorage(archiveStorage)
, mIdentityManager(KIdentityManagement::IdentityManager::self())
, mNumberOfStep(numberOfStep)
, mImportExportProgressIndicator(new ImportExportProgressIndicatorBase(this))
{
......
......@@ -33,11 +33,6 @@ class KZip;
class KArchiveFile;
class KArchiveEntry;
namespace KIdentityManagement {
class Identity;
class IdentityManager;
}
namespace PimCommon {
class CreateResource;
}
......@@ -123,7 +118,6 @@ protected:
QString mTempDirName;
Utils::StoredTypes mTypeSelected;
ArchiveStorage *mArchiveStorage = nullptr;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
QTemporaryDir *mTempDir = nullptr;
const KArchiveDirectory *mArchiveDirectory = nullptr;
int mNumberOfStep = -1;
......
......@@ -24,6 +24,7 @@
#include <MailCommon/FilterManager>
#include <MailCommon/FilterImporterExporter>
#include <KMime/Message>
#include <KIdentityManagement/kidentitymanagement/identitymanager.h>
#include "importexportprogressindicatorbase.h"
#include <AkonadiCore/Collection>
......@@ -49,6 +50,7 @@
ExportMailJobInterfaceImpl::ExportMailJobInterfaceImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: ExportMailJobInterface(parent, typeSelected, archiveStorage, numberOfStep)
, mIdentityManager(KIdentityManagement::IdentityManager::self())
{
}
......
......@@ -26,7 +26,10 @@
#include <QDateTime>
#include <time.h>
class ArchiveStorage;
namespace KIdentityManagement {
class Identity;
class IdentityManager;
}
class PIMDATAEXPORTER_TESTS_EXPORT ExportMailJobInterfaceImpl : public ExportMailJobInterface
{
Q_OBJECT
......@@ -50,6 +53,8 @@ protected:
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
void exportFilters() override;
Q_REQUIRED_RESULT QVector<uint> listIdentityUoid() const override;
private:
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
};
#endif // ExportMailJob_H
......@@ -30,6 +30,7 @@ using namespace Akonadi;
ImportMailJobInterfaceImpl::ImportMailJobInterfaceImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: ImportMailJobInterface(parent, typeSelected, archiveStorage, numberOfStep)
, mIdentityManager(KIdentityManagement::IdentityManager::self())
{
}
......
......@@ -30,6 +30,10 @@
class KArchiveDirectory;
class KArchiveFile;
class ArchiveStorage;
namespace KIdentityManagement {
class Identity;
class IdentityManager;
}
namespace MailTransport {
class Transport;
}
......@@ -53,6 +57,7 @@ protected:
void addMailTransport(MailTransport::Transport *mt, int defaultTransport, int transportId);
private:
Q_REQUIRED_RESULT QString uniqueIdentityName(const QString &name);
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
};
#endif // ImportMailJob_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