diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-04-12 17:04:24 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-04-26 17:45:58 +0000 |
commit | ca1ff5f48f23877dfab007f21b8e25685a2efec5 (patch) | |
tree | dcd40fe2126f5d8dcd1ddbd732e8bba50073ab98 /src/dbus/qdbusabstractadaptor.h | |
parent | 26192bcc133203fe9a50665ff4a707437573dfe3 (diff) | |
download | qtbase-ca1ff5f48f23877dfab007f21b8e25685a2efec5.tar.gz |
macOS: Localize title of edit menu's NSMenuItem via AppKit
In 939b7bfe66221975d3a12a6d0a6dd14d9ad04344 we synced up the NSMenuItem's
title to that of the corresponding NSMenu, as AppKit was observed to use
the NSMenuItem title for its heuristics of when to add dictation and
emoji entries to the menu.
But AppKit's heuristics are based on the localized name of the edit menu,
so we need to follow suit and look up AppKit's own localizations. This
is of course fragile, as we're relying on this localization continuing
to live in the InputManager table, but if that changes we'll just fall
back to using the title from the NSMenu, as we did before.
In addition, AppKit's heuristics also look for menu items in the menu
that match selectors such as copy:, paste:, etc, so even if our lookup
of the localized title fails, the additional heuristics would in most
cases still succeed in detecting the edit menu.
Task-number: QTBUG-53085
Task-number: QTBUG-79565
Change-Id: I5e12973b86ab35f10a8f7434bcae8a4cf134ecfd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit a92c202b49777696cbc64003f6292e6b61952140)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/dbus/qdbusabstractadaptor.h')
0 files changed, 0 insertions, 0 deletions