OS X: Fix menu roles

Never use TextHeuristicRole because it doesn't work as expected with
translations.
Also remove some unneeded OS X scopes.

Task-number: QTCREATORBUG-13101
Change-Id: If53ac36d9bee1782343e65d01a875b7e5434ff39
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Eike Ziller
2014-11-07 11:41:07 +01:00
parent 0e29d3f926
commit f554c5f5c0
3 changed files with 9 additions and 11 deletions

View File

@@ -313,6 +313,10 @@ void Action::addOverrideAction(QAction *action, const Core::Context &context, bo
{
if (Utils::HostOsInfo::isMacHost())
action->setIconVisibleInMenu(false);
// disallow TextHeuristic menu role, because it doesn't work with translations,
// e.g. QTCREATORBUG-13101
if (action->menuRole() == QAction::TextHeuristicRole)
action->setMenuRole(QAction::NoRole);
if (isEmpty())
m_action->initialize(action);
if (context.isEmpty()) {