summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-11-12 14:58:15 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-14 12:47:25 (GMT)
commit2b7ec50666d9e9b2cd8c0c74e8a3c889b77cfd1e (patch)
tree023597fc447102858cfb32528c620585608324c6
parent69b918ff4ac46019215e8021e4ff7c90952ee15a (diff)
downloadQt-2b7ec50666d9e9b2cd8c0c74e8a3c889b77cfd1e.zip
Qt-2b7ec50666d9e9b2cd8c0c74e8a3c889b77cfd1e.tar.gz
Qt-2b7ec50666d9e9b2cd8c0c74e8a3c889b77cfd1e.tar.bz2
Don't use Cocoa code unconditionally
The Cocoa code should only be used if QT_MAC_USE_COCOA is defined, this was causing problems in Carbon with menus which are now resolved. Task-number: QTBUG-27960 Change-Id: I60186d69a869def4b2f03f1b0fdde82208fcfbe5 Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r--src/gui/widgets/qmenu_mac.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm
index ef34f69..37755f1 100644
--- a/src/gui/widgets/qmenu_mac.mm
+++ b/src/gui/widgets/qmenu_mac.mm
@@ -1848,7 +1848,9 @@ OSMenuRef QMenuBarPrivate::macMenu()
return 0;
} else if (!mac_menubar->menu) {
mac_menubar->menu = qt_mac_create_menu(q);
+#ifdef QT_MAC_USE_COCOA
[mac_menubar->menu setAutoenablesItems:NO];
+#endif
ProcessSerialNumber mine, front;
if (GetCurrentProcess(&mine) == noErr && GetFrontProcess(&front) == noErr) {
if (!qt_mac_no_menubar_merge && !mac_menubar->apple_menu) {