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 981f407f authored by Laurent Montel's avatar Laurent Montel 😁

Make it compile

parent f4dac766
......@@ -180,6 +180,7 @@ set(kmailprivate_LIB_SRCS
settings/kmailsettings.cpp
kmreaderwin.cpp
kmsystemtray.cpp
unityservicemanager.cpp
undostack.cpp
kmkernel.cpp
kmcommands.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});
......
......@@ -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
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