From cbe46198ad02c25695cade69e506554663661a39 Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Fri, 26 Mar 2010 17:33:04 +0100
Subject: [PATCH] ActionManager support for iconVisibleInMenu

---
 src/plugins/coreplugin/actionmanager/actionmanager.cpp | 2 ++
 src/plugins/coreplugin/actionmanager/command.cpp       | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.cpp b/src/plugins/coreplugin/actionmanager/actionmanager.cpp
index a51bb782012..91289fb1c9a 100644
--- a/src/plugins/coreplugin/actionmanager/actionmanager.cpp
+++ b/src/plugins/coreplugin/actionmanager/actionmanager.cpp
@@ -367,6 +367,8 @@ Command *ActionManagerPrivate::registerOverridableAction(QAction *action, const
         baseAction->setParent(m_mainWnd);
 #ifdef Q_WS_MAC
         baseAction->setIconVisibleInMenu(false);
+#else
+        baseAction->setIconVisibleInMenu(action->isIconVisibleInMenu());
 #endif
         a->setAction(baseAction);
         m_mainWnd->addAction(baseAction);
diff --git a/src/plugins/coreplugin/actionmanager/command.cpp b/src/plugins/coreplugin/actionmanager/command.cpp
index ca584f80958..8a95b974653 100644
--- a/src/plugins/coreplugin/actionmanager/command.cpp
+++ b/src/plugins/coreplugin/actionmanager/command.cpp
@@ -493,6 +493,9 @@ void Action::actionChanged()
     if (hasAttribute(CA_UpdateIcon)) {
         m_action->setIcon(m_currentAction->icon());
         m_action->setIconText(m_currentAction->iconText());
+#ifndef Q_WS_MAC
+        m_action->setIconVisibleInMenu(m_currentAction->isIconVisibleInMenu());
+#endif
     }
     if (hasAttribute(CA_UpdateText)) {
         m_action->setText(m_currentAction->text());
-- 
GitLab