summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenubar_p.h
diff options
context:
space:
mode:
authorMorten Sorvig <morten.sorvig@nokia.com>2011-07-05 15:02:39 +0200
committerMorten Sorvig <morten.sorvig@nokia.com>2011-07-06 09:59:36 +0200
commit4ed17a650847d4ad129478608e9697c909126263 (patch)
treebddc9d0107bf05690b8b58a0fe73a337e59eb409 /src/widgets/widgets/qmenubar_p.h
parent14757fedb2e4a92fb37a90a88485107909f4f5e1 (diff)
Start porting the Mac menu system to QPA.
Global changes: qglobal.h: remove code that sets Q_WS_MAC and Q_MAC_USE_COCOA - this is dead code now. Add qt_widget_helpers_mac_p.h/mm which will contain helper functions needed for widgets on Qt 5. Menu-related changes: Set AA_DontUseNativeMenuBar before creating the platform plugin. Change Q_WS_MAC to Q_OS_MAC in the menu code. Remove Q_MAC_USE_COCOA defines and Carbon code paths. Move some qt_mac helper functions only used by the menu system to qmenu_mac.mm. #ifdef out some code paths that require further porting. Native menus are now disabled by default but can be enabled by the QPA plugins that want them by clearing AA_DontUseNativeMenuBar. Since we at compile time don't know which plugin will be loaded the Mac menu code is always included when building on OS X. (The above is currently only relevant for the Cocoa plugin.)
Diffstat (limited to 'src/widgets/widgets/qmenubar_p.h')
-rw-r--r--src/widgets/widgets/qmenubar_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index 44f71dfec3..e42162a48e 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -82,7 +82,7 @@ public:
#ifdef QT3_SUPPORT
, doAutoResize(false)
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
, mac_menubar(0)
#endif
@@ -96,7 +96,7 @@ public:
{ }
~QMenuBarPrivate()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
delete mac_menubar;
#endif
#ifdef Q_WS_WINCE
@@ -173,7 +173,7 @@ public:
#ifdef QT3_SUPPORT
bool doAutoResize;
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
//mac menubar binding
struct QMacMenuBarPrivate {
QList<QMacMenuAction*> actionItems;