diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-04-27 15:24:43 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-05-16 20:09:38 +0200 |
commit | 842dbca61716409b30714680c961684811eb97ca (patch) | |
tree | f465a9296584d92a46ebac2f83bf0fe3d73bfbb2 /doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp | |
parent | c33427240f1e7e99a36d4c8fff19975ebe508839 (diff) | |
download | qtbase-842dbca61716409b30714680c961684811eb97ca.tar.gz |
macOS: Detect menu bar roles for untranslated menu titles as well
If an application added an "About" menu action, and then loaded
the qtbase translations, we would try to match the incoming menu
title ("About") against QCoreApplication::translate("QCocoaMenuItem",
"About"), which since qtbase provides translation in the QCocoaMenuItem
context would fail, and we would not detect the menu item role
successfully.
For this to work, the application developer would need to add their
own translations for every menu item, and these translations would
have to match the QCocoaMenuItem translations in qtbase.
By also comparing the menu titles against the untranslated heuristics
we now account for the situation that the app has not translated
its menu items.
If the app does add translations of its menu items these still need
to match the QCocoaMenuItem context translations.
Change-Id: Ic2f019cd42b7e080187f9738840f84b0cec239df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp')
0 files changed, 0 insertions, 0 deletions