From a0865e4c7b5440bf96edd0c35ec4372707f04774 Mon Sep 17 00:00:00 2001 From: <> Date: Wed, 4 Aug 2010 21:28:18 +0200 Subject: [PATCH] Removed dbus ifdefs --- src/gnomeglobalshortcutbackend.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/gnomeglobalshortcutbackend.cpp b/src/gnomeglobalshortcutbackend.cpp index f34c20d..6fc3594 100644 --- a/src/gnomeglobalshortcutbackend.cpp +++ b/src/gnomeglobalshortcutbackend.cpp @@ -3,10 +3,7 @@ #include #include - -#ifdef QT_DBUS_LIB -# include -#endif +#include const char* GnomeGlobalShortcutBackend::kGsdService = "org.gnome.SettingsDaemon"; const char* GnomeGlobalShortcutBackend::kGsdPath = "/org/gnome/SettingsDaemon/MediaKeys"; @@ -17,17 +14,12 @@ GnomeGlobalShortcutBackend::GnomeGlobalShortcutBackend(GlobalShortcuts* parent) interface_(NULL) { } bool GnomeGlobalShortcutBackend::IsGsdAvailable() { -#ifdef QT_DBUS_LIB return QDBusConnection::sessionBus().interface()->isServiceRegistered( GnomeGlobalShortcutBackend::kGsdService); -#else // QT_DBUS_LIB - return false; -#endif } bool GnomeGlobalShortcutBackend::DoRegister() { // qDebug() << __PRETTY_FUNCTION__; -#ifdef QT_DBUS_LIB // Check if the GSD service is available if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(kGsdService)) return false; @@ -41,14 +33,9 @@ bool GnomeGlobalShortcutBackend::DoRegister() { this, SLOT(GnomeMediaKeyPressed(QString,QString))); return true; -#else // QT_DBUS_LIB - return false; -#endif } void GnomeGlobalShortcutBackend::DoUnregister() { - -#ifdef QT_DBUS_LIB // Check if the GSD service is available if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(kGsdService)) return; @@ -57,7 +44,6 @@ void GnomeGlobalShortcutBackend::DoUnregister() { disconnect(interface_, SIGNAL(MediaPlayerKeyPressed(QString,QString)), this, SLOT(GnomeMediaKeyPressed(QString,QString))); -#endif } void GnomeGlobalShortcutBackend::GnomeMediaKeyPressed(const QString&, const QString& key) { -- 2.39.5