Commit f6a92a74 authored by Laurent Montel's avatar Laurent Montel 😁

Better to move this code to mailkernel directly

parent 0a45ce1d
......@@ -114,7 +114,6 @@ using KMail::MailServiceImpl;
#include "foldercollectionmonitor.h"
#include "imapresourcesettings.h"
#include "util.h"
#include "pimcommon/util/imapresourcemanager.h"
#include "mailcommon/kernel/mailkernel.h"
#include "searchdialog/searchdescriptionattribute.h"
......@@ -144,7 +143,6 @@ KMKernel::KMKernel (QObject *parent) :
KMail::Util::migrateFromKMail1();
kDebug() << "Starting up...";
mImapResourceManager = new PimCommon::ImapResourceManager(this);
mySelf = this;
the_firstInstance = true;
......@@ -2084,11 +2082,6 @@ PimCommon::StorageServiceManager *KMKernel::storageServiceManager() const
return mStorageManager;
}
PimCommon::ImapResourceManager *KMKernel::imapResourceManager() const
{
return mImapResourceManager;
}
bool KMKernel::allowToDebugBalooSupport() const
{
return mDebugBaloo;
......
......@@ -44,7 +44,6 @@ class MessageSender;
namespace PimCommon {
class AutoCorrection;
class StorageServiceManager;
class ImapResourceManager;
}
/** The KMail namespace contains classes used for KMail.
......@@ -427,7 +426,6 @@ public:
void toggleSystemTray();
FolderArchiveManager *folderArchiveManager() const;
PimCommon::StorageServiceManager *storageServiceManager() const;
PimCommon::ImapResourceManager *imapResourceManager() const;
bool allowToDebugBalooSupport() const;
......@@ -535,7 +533,6 @@ private:
PimCommon::AutoCorrection *mAutoCorrection;
FolderArchiveManager *mFolderArchiveManager;
PimCommon::StorageServiceManager *mStorageManager;
PimCommon::ImapResourceManager *mImapResourceManager;
bool mDebugBaloo;
};
......
......@@ -22,6 +22,7 @@
#include "pop3settings.h"
#include "pimcommon/util/pimutil.h"
#include "pimcommon/util/imapresourcemanager.h"
#include <Akonadi/AgentInstance>
#include <Akonadi/AgentManager>
......@@ -61,6 +62,7 @@ Kernel::Kernel( QObject *parent ) : QObject( parent )
mKernelIf = 0;
mSettingsIf = 0;
mFilterIf = 0;
mImapResourceManager = new PimCommon::ImapResourceManager(this);
}
Kernel::~Kernel()
......@@ -73,6 +75,11 @@ Kernel *Kernel::self()
return sInstance->kernel; //will create it
}
PimCommon::ImapResourceManager *Kernel::imapResourceManager() const
{
return mImapResourceManager;
}
Akonadi::Collection Kernel::collectionFromId( const Akonadi::Collection::Id &id ) const
{
const QModelIndex idx =
......
......@@ -28,7 +28,9 @@
#include <KSharedConfig>
#include <QObject>
namespace PimCommon {
class ImapResourceManager;
}
namespace MailCommon {
/**
......@@ -161,6 +163,8 @@ public:
void emergencyExit( const QString &reason );
PimCommon::ImapResourceManager *imapResourceManager() const;
private:
void findCreateDefaultCollection( Akonadi::SpecialMailCollections::Type );
......@@ -179,6 +183,7 @@ private:
IKernel *mKernelIf;
IFilter *mFilterIf;
ISettings *mSettingsIf;
PimCommon::ImapResourceManager *mImapResourceManager;
};
}
......
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