From 7c7e47493edec987569a60e12456de5a2c62a230 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 14 Mar 2012 14:55:08 +0100 Subject: Replace Q_WS_MAC with Q_OS_MAC in qshortcut.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This re-enables shortcut context matching for menubar actions. Change-Id: I0d9f2b3d4316a4611afe96eb1a2cf29cb9e91851 Reviewed-by: Morten Johan Sørvig --- src/widgets/kernel/qshortcut.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/widgets/kernel/qshortcut.cpp') diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp index 07c7a02d4d..92f6fbafba 100644 --- a/src/widgets/kernel/qshortcut.cpp +++ b/src/widgets/kernel/qshortcut.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -114,7 +115,7 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context) static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidget *active_window) { bool visible = w->isVisible(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (!qApp->testAttribute(Qt::AA_DontUseNativeMenuBar) && qobject_cast(w)) visible = true; #endif @@ -177,7 +178,7 @@ static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidge static bool correctGraphicsWidgetContext(Qt::ShortcutContext context, QGraphicsWidget *w, QWidget *active_window) { bool visible = w->isVisible(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (!qApp->testAttribute(Qt::AA_DontUseNativeMenuBar) && qobject_cast(w)) visible = true; #endif -- cgit v1.2.3