From 010c4fc0b5ca8ceccf15417b833bea4ce1016f43 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 24 Sep 2011 11:56:33 +0200 Subject: [PATCH] Change define to determine use of DBUS to USE_DBUS, to prevent overlap with Qt-defined QT_DBUS --- bitcoin-qt.pro | 2 +- src/qt/notificator.cpp | 12 ++++++------ src/qt/notificator.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index c7eb563b..3fff9ac9 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -23,7 +23,7 @@ count(USE_UPNP, 1) { # use: qmake "USE_DBUS=1" count(USE_DBUS, 1) { message(Building with DBUS (Freedesktop notifications) support) - DEFINES += QT_DBUS + DEFINES += USE_DBUS QT += dbus } diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp index 86ccfc85..cf0c0a39 100644 --- a/src/qt/notificator.cpp +++ b/src/qt/notificator.cpp @@ -9,7 +9,7 @@ #include #include -#ifdef QT_DBUS +#ifdef USE_DBUS #include #include #endif @@ -23,7 +23,7 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, programName(programName), mode(None), trayIcon(trayicon) -#ifdef QT_DBUS +#ifdef USE_DBUS ,interface(0) #endif { @@ -31,7 +31,7 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, { mode = QSystemTray; } -#ifdef QT_DBUS +#ifdef USE_DBUS interface = new QDBusInterface("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications"); if(interface->isValid()) @@ -43,12 +43,12 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, Notificator::~Notificator() { -#ifdef QT_DBUS +#ifdef USE_DBUS delete interface; #endif } -#ifdef QT_DBUS +#ifdef USE_DBUS // Loosely based on http://www.qtcentre.org/archive/index.php/t-25879.html class FreedesktopImage @@ -205,7 +205,7 @@ void Notificator::notify(Class cls, const QString &title, const QString &text, c { switch(mode) { -#ifdef QT_DBUS +#ifdef USE_DBUS case Freedesktop: notifyDBus(cls, title, text, icon, millisTimeout); break; diff --git a/src/qt/notificator.h b/src/qt/notificator.h index 13f6a908..4217f7e0 100644 --- a/src/qt/notificator.h +++ b/src/qt/notificator.h @@ -6,7 +6,7 @@ QT_BEGIN_NAMESPACE class QSystemTrayIcon; -#ifdef QT_DBUS +#ifdef USE_DBUS class QDBusInterface; #endif QT_END_NAMESPACE @@ -52,7 +52,7 @@ private: QString programName; Mode mode; QSystemTrayIcon *trayIcon; -#ifdef QT_DBUS +#ifdef USE_DBUS QDBusInterface *interface; void notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout);