diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-24 14:47:20 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-02-24 14:47:20 +0000 |
commit | b736151c2bb6c68f700d38274d740a6e0cf59a49 (patch) | |
tree | 83e110a7205757addba6e86a3c2367e4b52afa05 /src/widgets/widgets/qmenu_mac.mm | |
parent | ff76300a5c9f209f625384f35ad0fdb0acebd799 (diff) | |
parent | 1fadc7292b66d4b3984bf5ef36c70b46b07a1c6b (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/widgets/widgets/qmenu_mac.mm')
-rw-r--r-- | src/widgets/widgets/qmenu_mac.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/widgets/widgets/qmenu_mac.mm b/src/widgets/widgets/qmenu_mac.mm index c24779d61f..29f5913b5d 100644 --- a/src/widgets/widgets/qmenu_mac.mm +++ b/src/widgets/widgets/qmenu_mac.mm @@ -73,8 +73,11 @@ inline QPlatformNativeInterface::NativeResourceForIntegrationFunction resolvePla \since 5.2 Returns the native NSMenu for this menu. Available on OS X only. + + \note Qt sets the delegate on the native menu. If you need to set your own + delegate, make sure you save the original one and forward any calls to it. */ -NSMenu* QMenu::toNSMenu() +NSMenu *QMenu::toNSMenu() { // Call into the cocoa platform plugin: qMenuToNSMenu(platformMenu()) QPlatformNativeInterface::NativeResourceForIntegrationFunction function = resolvePlatformFunction("qmenutonsmenu"); @@ -139,8 +142,11 @@ void QMenuPrivate::moveWidgetToPlatformItem(QWidget *widget, QPlatformMenuItem* \since 5.2 Returns the native NSMenu for this menu bar. Available on OS X only. + + \note Qt may set the delegate on the native menu bar. If you need to set your + own delegate, make sure you save the original one and forward any calls to it. */ -NSMenu* QMenuBar::toNSMenu() +NSMenu *QMenuBar::toNSMenu() { // Call into the cocoa platform plugin: qMenuBarToNSMenu(platformMenuBar()) QPlatformNativeInterface::NativeResourceForIntegrationFunction function = resolvePlatformFunction("qmenubartonsmenu"); |