diff options
author | Andy Shaw <andy.shaw@qt.io> | 2017-09-25 13:43:05 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2017-12-01 10:11:18 +0000 |
commit | 11a2e0aa2dd921e16cbc80479dd3667dc62ff18a (patch) | |
tree | dc133b165e349ac4decbc97d5abdb3c339e7cb62 /src/plugins/platforms/cocoa/qcocoamenubar.h | |
parent | 673762b02e4d112198501e91ab487b04a1ed3a39 (diff) |
Cocoa: Ensure menus for a dialog's menubar are validated correctly
Although the items were enabled for a dialog's menubar they were not
appearing as such because Cocoa will query the menu item's target to see
if it has a worksWhenModal selector. Therefore to ensure that the menu
item will be enabled, we need to add this selector to our delegate and
return YES from it when the window for the menubar is the dialog.
Task-number: QTBUG-44584
Change-Id: Ic62dc027d563069d2f5c2b7bf9810184bd76de39
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoamenubar.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoamenubar.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.h b/src/plugins/platforms/cocoa/qcocoamenubar.h index a4ee531e91..a259147247 100644 --- a/src/plugins/platforms/cocoa/qcocoamenubar.h +++ b/src/plugins/platforms/cocoa/qcocoamenubar.h @@ -71,6 +71,7 @@ public: QList<QCocoaMenuItem*> merged() const; NSMenuItem *itemForRole(QPlatformMenuItem::MenuRole r); + QCocoaWindow *cocoaWindow() const; void syncMenu_helper(QPlatformMenu *menu, bool menubarUpdate); |