From 07ec1021952a2aff80c9baccea9dcd947f5b5c0a Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Feb 2017 19:57:30 -0800 Subject: 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) Reviewed-by: Marc Mutz Reviewed-by: Gabriel de Dietrich --- src/widgets/widgets/qmdisubwindow.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/widgets/widgets/qmdisubwindow.cpp') 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 #include #include -#if QT_CONFIG(style_mac) -#include -#endif #include #include @@ -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(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. -- cgit v1.2.3