summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp13
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes_p.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index 8db4b85c86..f8ced57553 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -44,6 +44,7 @@
#include <QtCore/QFile>
#include <QtCore/QDebug>
#include <QtCore/QHash>
+#include <QtCore/QLoggingCategory>
#include <QtCore/QSettings>
#include <QtCore/QVariant>
#include <QtCore/QStringList>
@@ -60,6 +61,8 @@
QT_BEGIN_NAMESPACE
+Q_DECLARE_LOGGING_CATEGORY(qLcTray)
+
ResourceHelper::ResourceHelper()
{
std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(0));
@@ -98,6 +101,7 @@ static bool isDBusTrayAvailable() {
if (conn.isWatcherRegistered())
dbusTrayAvailable = true;
dbusTrayAvailableKnown = true;
+ qCDebug(qLcTray) << "D-Bus tray available:" << dbusTrayAvailable;
}
return dbusTrayAvailable;
}
@@ -161,6 +165,15 @@ QStringList QGenericUnixTheme::xdgIconThemePaths()
return paths;
}
+#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
+QPlatformSystemTrayIcon *QGenericUnixTheme::createPlatformSystemTrayIcon() const
+{
+ if (isDBusTrayAvailable())
+ return new QDBusTrayIcon();
+ return Q_NULLPTR;
+}
+#endif
+
QVariant QGenericUnixTheme::themeHint(ThemeHint hint) const
{
switch (hint) {
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
index fd9519ed69..115b9d9f91 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
@@ -79,6 +79,9 @@ public:
virtual QVariant themeHint(ThemeHint hint) const Q_DECL_OVERRIDE;
static QStringList xdgIconThemePaths();
+#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
+ QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const Q_DECL_OVERRIDE;
+#endif
static const char *name;
};