Replace Q_WS_MAC with Q_OS_MAC in qshortcut.cpp
This re-enables shortcut context matching for menubar actions. Change-Id: I0d9f2b3d4316a4611afe96eb1a2cf29cb9e91851 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This commit is contained in:
parent
b6bce2dd75
commit
7c7e47493e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user