From 663d799166671f4ff0f322b374d49e340a1bf245 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 7 Nov 2018 10:47:12 +0100 Subject: [PATCH] macOS: Fix that Preferences do not work with german translation By default Qt does heuristics on the menu item text, to decide the menu role of an item, including whether the item should be used for the Preferences entry in the application menu. Now, "QML Profiler Options" is translated to "Einstellungen des QML- Profilers" which matches the heuristics for the "Preferences" item, replacing the actual Preferences. For menu items we already force the menu role to NoRole if there hasn't been a role explicitly set. Do that for the generated menus as well. Change-Id: I4abb3f20fd51ef033e5ec68c2283af8b7b52927d Reviewed-by: Christian Stenger --- src/plugins/coreplugin/actionmanager/actioncontainer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp index b602dc54cd9..c1a543b1314 100644 --- a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp +++ b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp @@ -383,6 +383,7 @@ MenuActionContainer::MenuActionContainer(Id id) m_menu(new QMenu) { m_menu->setObjectName(id.toString()); + m_menu->menuAction()->setMenuRole(QAction::NoRole); setOnAllDisabledBehavior(Disable); }