summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-11-09 10:15:46 +0200
committerOrgad Shaneh <orgads@gmail.com>2014-11-10 14:14:18 +0100
commita43f162d0ad10518a7f206179b7c4f3b94473998 (patch)
tree85ba5afde1e6748cfeb8d36b488ed24167c00fa9 /src/plugins/coreplugin/actionmanager/actioncontainer.cpp
parent895e0d8439daeb579ad0e076e908e39de7985362 (diff)
downloadqt-creator-a43f162d0ad10518a7f206179b7c4f3b94473998.tar.gz
Mercurial: Disable hidden menu entries
To avoid shortcut ambiguity Task-number: QTCREATORBUG-13364 Change-Id: Ibce1701be72376845624856b5de097332aaaccae Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/coreplugin/actionmanager/actioncontainer.cpp')
-rw-r--r--src/plugins/coreplugin/actionmanager/actioncontainer.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
index 6cf8ba718e..893e217937 100644
--- a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
+++ b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
@@ -307,6 +307,18 @@ Command *ActionContainerPrivate::addSeparator(const Context &context, Id group,
return cmd;
}
+void ActionContainerPrivate::setEnabled(bool enabled)
+{
+ foreach (const Group &group, m_groups) {
+ foreach (QObject *item, group.items) {
+ if (Command *command = qobject_cast<Command *>(item))
+ command->action()->setEnabled(enabled);
+ else if (ActionContainer *container = qobject_cast<ActionContainer *>(item))
+ container->setEnabled(enabled);
+ }
+ }
+}
+
void ActionContainerPrivate::clear()
{
QMutableListIterator<Group> it(m_groups);