diff options
author | Liang Qi <liang.qi@qt.io> | 2017-01-14 21:58:02 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-01-14 22:02:55 +0100 |
commit | 00935bf8c29d54fcd794ce5673cb5f973808cbf9 (patch) | |
tree | 52b470f84397b023edeb67e8ec42c01337825980 /src/gui/kernel | |
parent | 6292ecdf6da6c13942dd3f39c9cd164c29c7ab37 (diff) | |
parent | cfd069181c01bbade16c173a96100819aa719613 (diff) |
Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
src/gui/painting/qcoregraphics.mm
Change-Id: I4d49535cd75f2cdf0151c1dbff312cce5e159760
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qplatformsystemtrayicon.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/kernel/qplatformsystemtrayicon.cpp b/src/gui/kernel/qplatformsystemtrayicon.cpp index 30db966df7..973b998059 100644 --- a/src/gui/kernel/qplatformsystemtrayicon.cpp +++ b/src/gui/kernel/qplatformsystemtrayicon.cpp @@ -40,6 +40,9 @@ #include "qplatformsystemtrayicon.h" +#include <QtGui/private/qguiapplication_p.h> +#include <QtGui/qpa/qplatformtheme.h> + #ifndef QT_NO_SYSTEMTRAYICON QT_BEGIN_NAMESPACE @@ -158,11 +161,10 @@ QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon() */ /*! - This method is called in case there is no QPlatformMenu available when - updating the menu. This allows the abstraction to provide a menu for the - system tray icon even if normally a non-native menu is used. - - The default implementation returns a null pointer. + This method allows platforms to use a different QPlatformMenu for system + tray menus than what would normally be used for e.g. menu bars. The default + implementation falls back to a platform menu created by the platform theme, + which may be null on platforms without native menus. \sa updateMenu() \since 5.3 @@ -170,7 +172,7 @@ QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon() QPlatformMenu *QPlatformSystemTrayIcon::createMenu() const { - return Q_NULLPTR; + return QGuiApplicationPrivate::platformTheme()->createPlatformMenu(); } QT_END_NAMESPACE |