diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-25 09:55:25 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-25 09:55:25 +0100 |
commit | 5439451defb11c29e2e1d18737cb99d0f576a961 (patch) | |
tree | a63443ca2445eb4447282c2f31938fb993cf039b /src/widgets/widgets | |
parent | 4e551aeb0e202397aafc5c6d09137acee98c9404 (diff) | |
parent | 97965a0908b8fbf7f01d0880410929a4ea61b48d (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
mkspecs/features/qt_module.prf
src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
Change-Id: I7912c23b02b186831f0e465dbe5d1f9936205439
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 1 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu_mac.mm | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 46507e3e3c..1cf7591302 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2444,6 +2444,7 @@ struct IndexSetter { { cb->setCurrentIndex(index); emit cb->activated(index); + emit cb->activated(cb->itemText(index)); } }; } 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"); |