diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-02-19 13:47:22 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-02-20 11:41:40 +0000 |
commit | 23e9b57e3d261f66168a8a28ccb8e5c886b4841f (patch) | |
tree | 4054c503071c814c6fa72c8d5f63ac56804fb449 /src/platformsupport/dbustray | |
parent | 37ce38daec9c0d73ecb846e1d16709deeef6d79b (diff) |
D-Bus system tray: properly check whether StatusNotifierHost available
"org.kde.StatusNotifierWatcher" is just a watcher/helper, whereas the
actual systray object is "org.kde.StatusNotifierHost-$PID".
The org.kde.StatusNotifierWatcher.IsStatusNotifierHostRegistered
property can tell us whether there is an actual system tray.
Also renamed the accessor to isStatusNotifierHostRegistered since we
are checking for the host, and also because it can be confusing
that it's a member of QDBusMenuConnection if the name isn't clear.
See also KDE bug 339707
Change-Id: I218c5357b9cc5a62e5cc07abe980893b826f98f4
Reviewed-by: Martin Klapetek <mklapetek@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Diffstat (limited to 'src/platformsupport/dbustray')
-rw-r--r-- | src/platformsupport/dbustray/qdbustrayicon.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/platformsupport/dbustray/qdbustrayicon.cpp b/src/platformsupport/dbustray/qdbustrayicon.cpp index 18e72d852a..d85d29a5c7 100644 --- a/src/platformsupport/dbustray/qdbustrayicon.cpp +++ b/src/platformsupport/dbustray/qdbustrayicon.cpp @@ -281,11 +281,8 @@ void QDBusTrayIcon::notificationClosed(uint id, uint reason) bool QDBusTrayIcon::isSystemTrayAvailable() const { QDBusMenuConnection * conn = const_cast<QDBusTrayIcon *>(this)->dBusConnection(); - - // If the KDE watcher service is registered, we must be on a desktop - // where a StatusNotifier-conforming system tray exists. - qCDebug(qLcTray) << conn->isWatcherRegistered(); - return conn->isWatcherRegistered(); + qCDebug(qLcTray) << conn->isStatusNotifierHostRegistered(); + return conn->isStatusNotifierHostRegistered(); } QT_END_NAMESPACE |