From 2b7ec50666d9e9b2cd8c0c74e8a3c889b77cfd1e Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 12 Nov 2012 15:58:15 +0100 Subject: Don't use Cocoa code unconditionally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Morten Johan Sørvig --- src/gui/widgets/qmenu_mac.mm | 2 ++ 1 file changed, 2 insertions(+) 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) { -- cgit v0.12