summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-10-19 19:22:32 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-10-21 16:05:47 +0200
commitd42cfeb84faf154b46f2811b2059946b396fcc12 (patch)
tree983dd633326c9ceb4908f79066c29a6641bae17e /examples
parente2fc3246d24e2b3a64ec2005e51efae88cbdc32e (diff)
macOS: add default Edit menu items, if not added by AppKit
AppKit automatically appends "Start Dictation..." and "Emoji & Symbols" menu items, after a separator, to a menu in the menu bar that has the title "Edit" in the operating system language. Qt applications might however be translated to some other language, in which case the "Edit" menu is not recognized by AppKit, and the menu items won't be added. This is bad for accessibility and for users wanting to type emojis. If we have a menu that has the title "Edit" as translated in Qt's i18n system, then create those items manually. To prevent a duplication of the system- provided menu items, don't add the items if there already is one with the action being set to the relevant selector. Otherwise, perform the selector or call the NSApplication method ourselves. This then results in the relevant keyboard input through regular code paths. Fixes: QTBUG-79565 Change-Id: Ifd06036211756277550d398034689aca8e770133 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions