Core: Fix handling of displaying shortcuts in context menus

Change-Id: I19f93780bd2c21a3a54e0a4c1b9db87e2327d5ed
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2022-11-10 10:45:09 +01:00
parent 643d205364
commit 7b02984088

View File

@@ -274,7 +274,7 @@ void GeneralSettings::setShowShortcutsInContextMenu(bool show)
ICore::settings()->setValueWithDefault(settingsKeyShortcutsInContextMenu, ICore::settings()->setValueWithDefault(settingsKeyShortcutsInContextMenu,
show, show,
m_defaultShowShortcutsInContextMenu); m_defaultShowShortcutsInContextMenu);
QGuiApplication::styleHints()->setShowShortcutsInContextMenus(show); QCoreApplication::setAttribute(Qt::AA_DontShowShortcutsInContextMenus, !show);
} }
GeneralSettings::GeneralSettings() GeneralSettings::GeneralSettings()