Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 51c05119 authored by Laurent Montel's avatar Laurent Montel 😁

Instantiate in kmkernel

parent 981f407f
......@@ -24,6 +24,7 @@ using KPIM::RecentAddresses;
#include "configuredialog/configuredialog.h"
#include "kmcommands.h"
#include "kmsystemtray.h"
#include "unityservicemanager.h"
#include <MessageCore/StringUtil>
#include "mailcommon/mailutil.h"
#include "pop3settings.h"
......@@ -131,6 +132,7 @@ KMKernel::KMKernel(QObject *parent)
mDebug = !qEnvironmentVariableIsEmpty("KDEPIM_DEBUGGING");
mSystemNetworkStatus = PimCommon::NetworkManager::self()->networkConfigureManager()->isOnline();
mUnityServiceManager = new KMail::UnityServiceManager(this);
Akonadi::AttributeFactory::registerAttribute<Akonadi::SearchDescriptionAttribute>();
QDBusConnection::sessionBus().registerService(QStringLiteral("org.kde.kmail"));
......
......@@ -56,6 +56,7 @@ namespace KMail {
class MailServiceImpl;
class UndoStack;
class KMSystemTray;
class UnityServiceManager;
}
using KMail::MailServiceImpl;
using KMail::UndoStack;
......@@ -521,6 +522,7 @@ private:
bool mSystemNetworkStatus = true;
KMail::KMSystemTray *mSystemTray = nullptr;
KMail::UnityServiceManager *mUnityServiceManager = nullptr;
QHash<QString, KPIM::ProgressItem::CryptoStatus> mResourceCryptoSettingCache;
MailCommon::FolderCollectionMonitor *mFolderCollectionMonitor = nullptr;
Akonadi::EntityTreeModel *mEntityTreeModel = nullptr;
......
......@@ -28,15 +28,6 @@
#include <QApplication>
using namespace KMail;
UnityServiceManager *UnityServiceManager::mInstance = nullptr;
UnityServiceManager *UnityServiceManager::instance()
{
if (!mInstance) {
mInstance = new UnityServiceManager;
}
return mInstance;
}
UnityServiceManager::UnityServiceManager(QObject *parent)
: QObject(parent)
......
......@@ -31,8 +31,6 @@ public:
explicit UnityServiceManager(QObject *parent = nullptr);
~UnityServiceManager();
static UnityServiceManager *instance();
public Q_SLOTS:
void slotSetUnread(int unread);
......@@ -40,7 +38,6 @@ private:
void updateCount();
void initUnity();
QDBusServiceWatcher *mUnityServiceWatcher = nullptr;
static UnityServiceManager *mInstance;
int mCount;
bool mUnityServiceAvailable = false;
};
......
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