Replace Q_WS_MAC with Q_OS_MAC in qshortcut.cpp
authorBradley T. Hughes <bradley.hughes@nokia.com>
Wed, 14 Mar 2012 13:55:08 +0000 (14:55 +0100)
committerQt by Nokia <qt-info@nokia.com>
Sat, 17 Mar 2012 06:06:44 +0000 (07:06 +0100)
This re-enables shortcut context matching for menubar actions.

Change-Id: I0d9f2b3d4316a4611afe96eb1a2cf29cb9e91851
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
src/widgets/kernel/qshortcut.cpp

index 07c7a02..92f6fba 100644 (file)
@@ -46,6 +46,7 @@
 #include <qevent.h>
 #include <qwhatsthis.h>
 #include <qmenu.h>
+#include <qmenubar.h>
 #include <qapplication.h>
 #include <private/qapplication_p.h>
 #include <private/qshortcutmap_p.h>
@@ -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<QMenuBar *>(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<QMenuBar *>(w))
         visible = true;
 #endif