summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenubar_p.h
diff options
context:
space:
mode:
authorJames Turner <james.turner@kdab.com>2012-02-27 13:04:45 +0000
committerQt by Nokia <qt-info@nokia.com>2012-05-19 01:45:04 +0200
commit1f55af8e54dc4841441ab1adf7759baace9452fa (patch)
tree42beff251511100aad43ad31fdb276d67b43e59f /src/widgets/widgets/qmenubar_p.h
parent864e9963843f209f61c72123df05743bcbf1e139 (diff)
QPA menu abstraction, originally based on Morten's work
Create a QPA abstraction for native menus, derived from the Cocoa support in 4.8, but with the expectation to support other platforms too. Update the QtWidget QMenu and QMenuBar code to maintain their QPA equivalents if they exist. Change-Id: Id605de3da8811dc832bf48b35f9107778ad320ff Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/widgets/widgets/qmenubar_p.h')
-rw-r--r--src/widgets/widgets/qmenubar_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index 139f5703de..b4e178b7d2 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -55,6 +55,7 @@
#include "QtWidgets/qstyleoption.h"
#include <private/qmenu_p.h> // Mac needs what in this file!
+#include <qpa/qplatformmenu.h>
QT_BEGIN_NAMESPACE
@@ -145,6 +146,8 @@ public:
QBasicTimer autoReleaseTimer;
QPlatformMenuBar *platformMenuBar;
+ inline int indexOf(QAction *act) const { return q_func()->actions().indexOf(act); }
+
#ifdef Q_OS_WINCE
void wceCreateMenuBar(QWidget *);
void wceDestroyMenuBar();