Skip to content

Commit

Permalink
Qt6: Drop support for QDbusTrayIcon for not being exported by Qt
Browse files Browse the repository at this point in the history
  • Loading branch information
grulja committed Nov 22, 2021
1 parent a7b181b commit b164b51
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/theme/qgnomeplatformtheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
#include <gtk-3.0/gtk/gtk.h>
#define signals Q_SIGNALS

#if QT_VERSION < 0x060000
#ifndef QT_NO_SYSTEMTRAYICON
#include <private/qdbustrayicon_p.h>
#endif
#endif

QGnomePlatformTheme::QGnomePlatformTheme()
{
Expand Down Expand Up @@ -109,6 +111,7 @@ QPlatformDialogHelper *QGnomePlatformTheme::createPlatformDialogHelper(QPlatform
}
}

#if QT_VERSION < 0x060000
#ifndef QT_NO_SYSTEMTRAYICON
static bool isDBusTrayAvailable() {
static bool dbusTrayAvailable = false;
Expand All @@ -123,13 +126,16 @@ static bool isDBusTrayAvailable() {
return dbusTrayAvailable;
}
#endif
#endif

#ifndef QT_NO_SYSTEMTRAYICON
QPlatformSystemTrayIcon* QGnomePlatformTheme::createPlatformSystemTrayIcon() const
{
#if QT_VERSION < 0x060000
if (isDBusTrayAvailable()) {
return new QDBusTrayIcon();
}
#endif
return Q_NULLPTR;
}
#endif

0 comments on commit b164b51

Please sign in to comment.