diff options
author | Dean Dettman <dean.dettman@nokia.com> | 2009-10-20 10:13:52 (GMT) |
---|---|---|
committer | Dean Dettman <dean.dettman@nokia.com> | 2009-10-20 10:13:52 (GMT) |
commit | cc57e64eb54cf85a9c6ece2496df7540f0f3c9d8 (patch) | |
tree | aa7f52fed0d81f9e828f9f037cf3168746d96a1e /src/gui | |
parent | 5651d2547261ccecbf50f8141c634f59c0adc00d (diff) | |
parent | 5fd8c58dde0c61a723ab124ac74c863f67288a14 (diff) | |
download | Qt-cc57e64eb54cf85a9c6ece2496df7540f0f3c9d8.zip Qt-cc57e64eb54cf85a9c6ece2496df7540f0f3c9d8.tar.gz Qt-cc57e64eb54cf85a9c6ece2496df7540f0f3c9d8.tar.bz2 |
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qmenu_mac.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index a7f6f0d..0f92ad9 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -1421,7 +1421,7 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action) SetMenuItemProperty(data.submenuHandle, 0, kMenuCreatorQt, kMenuPropertyCausedQWidget, sizeof(caused), &caused); #else NSMenu *subMenu = static_cast<NSMenu *>(action->action->menu()->macMenu()); - if ([subMenu supermenu] != nil) { + if ([subMenu supermenu] && [subMenu supermenu] != [item menu]) { // The menu is already a sub-menu of another one. Cocoa will throw an exception, // in such cases. For the time being, a new QMenu with same set of actions is the // only workaround. @@ -1694,7 +1694,7 @@ QMenuBarPrivate::QMacMenuBarPrivate::syncAction(QMacMenuAction *action) GetMenuItemProperty(action->menu, 0, kMenuCreatorQt, kMenuPropertyQWidget, sizeof(caused), 0, &caused); SetMenuItemProperty(submenu, 0, kMenuCreatorQt, kMenuPropertyCausedQWidget, sizeof(caused), &caused); #else - if ([submenu supermenu] != nil) + if ([submenu supermenu] && [submenu supermenu] != [item menu]) return; else [item setSubmenu:submenu]; |