summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-01-19 08:52:42 +0100
committerLaurent Montel <[email protected]>2018-01-19 08:52:42 +0100
commit981f407f065ee71f89ad25e4dd949ff9c4fb37c7 (patch)
tree69b7c8ee6f02068e5e0e04b2398dd7b94c710848
parentf4dac76680e23db6ecba2a18fd255248f90ae97b (diff)
Make it compile
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/unityservicemanager.cpp11
-rw-r--r--src/unityservicemanager.h9
3 files changed, 11 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 252ac86..ca3b746 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -180,6 +180,7 @@ set(kmailprivate_LIB_SRCS
settings/kmailsettings.cpp
kmreaderwin.cpp
kmsystemtray.cpp
+ unityservicemanager.cpp
undostack.cpp
kmkernel.cpp
kmcommands.cpp
diff --git a/src/unityservicemanager.cpp b/src/unityservicemanager.cpp
index 1fd25a5..09a5ce3 100644
--- a/src/unityservicemanager.cpp
+++ b/src/unityservicemanager.cpp
@@ -27,6 +27,7 @@
#include <QDBusConnectionInterface>
#include <QApplication>
+using namespace KMail;
UnityServiceManager *UnityServiceManager::mInstance = nullptr;
UnityServiceManager *UnityServiceManager::instance()
@@ -40,7 +41,7 @@ UnityServiceManager *UnityServiceManager::instance()
UnityServiceManager::UnityServiceManager(QObject *parent)
: QObject(parent)
, mUnityServiceWatcher(new QDBusServiceWatcher(this))
- , m_unread(0)
+ , mCount(0)
{
initUnity();
}
@@ -52,7 +53,7 @@ UnityServiceManager::~UnityServiceManager()
void UnityServiceManager::slotSetUnread(int unread)
{
- m_unread = unread;
+ mCount = unread;
updateCount();
}
@@ -62,11 +63,11 @@ void UnityServiceManager::updateCount()
const QString launcherId = qApp->desktopFileName() + QLatin1String(".desktop");
const QVariantMap properties{
- {QStringLiteral("count-visible"), m_unread > 0},
- {QStringLiteral("count"), m_unread}
+ {QStringLiteral("count-visible"), mCount > 0},
+ {QStringLiteral("count"), mCount}
};
- QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/org/akregator/UnityLauncher"),
+ QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/org/kmail2/UnityLauncher"),
QStringLiteral("com.canonical.Unity.LauncherEntry"),
QStringLiteral("Update"));
message.setArguments({launcherId, properties});
diff --git a/src/unityservicemanager.h b/src/unityservicemanager.h
index 020c647..3f0ed04 100644
--- a/src/unityservicemanager.h
+++ b/src/unityservicemanager.h
@@ -22,10 +22,9 @@
#define UNITYSERVICEMANAGER_H
#include <QObject>
-#include "akregator_export.h"
class QDBusServiceWatcher;
-
-class AKREGATOR_EXPORT UnityServiceManager : public QObject
+namespace KMail {
+class UnityServiceManager : public QObject
{
Q_OBJECT
public:
@@ -42,8 +41,8 @@ private:
void initUnity();
QDBusServiceWatcher *mUnityServiceWatcher = nullptr;
static UnityServiceManager *mInstance;
- int m_unread;
+ int mCount;
bool mUnityServiceAvailable = false;
};
-
+}
#endif // UNITYSERVICEMANAGER_H