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