diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-02-27 19:57:30 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-03-08 20:51:01 +0000 |
commit | 07ec1021952a2aff80c9baccea9dcd947f5b5c0a (patch) | |
tree | 4478115edd712ba382fce371ffa829add1dd3784 /src/widgets/widgets/qmdisubwindow.cpp | |
parent | 8f52ad9fe084eee26869e4a94a678076845a6f58 (diff) |
Introduce SH_TitleBar_ShowToolTipsOnButtons style hint
This removes some tight coupling between QMdiSubWindow and
QMacStyle in order to allow the latter to be moved into a plugin.
Change-Id: I090c2c5774279c0454486c3db2e77f00a646b145
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmdisubwindow.cpp')
-rw-r--r-- | src/widgets/widgets/qmdisubwindow.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index a9e89e8f67..5ea86a592e 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -158,9 +158,6 @@ #include <QMainWindow> #include <QScrollBar> #include <QDebug> -#if QT_CONFIG(style_mac) -#include <private/qmacstyle_mac_p.h> -#endif #include <QMdiArea> #include <QScopedValueRollback> @@ -300,11 +297,8 @@ static void showToolTip(QHelpEvent *helpEvent, QWidget *widget, const QStyleOpti Q_ASSERT(helpEvent->type() == QEvent::ToolTip); Q_ASSERT(widget); -#if QT_CONFIG(style_mac) - // Native Mac windows don't show tool tip. - if (qobject_cast<QMacStyle *>(widget->style())) + if (widget->style()->styleHint(QStyle::SH_TitleBar_ShowToolTipsOnButtons, &opt, widget)) return; -#endif // Convert CC_MdiControls to CC_TitleBar. Sub controls of different complex // controls cannot be in the same switch as they might have the same value. |