forked from qt-creator/qt-creator
Mercurial: Disable hidden menu entries
To avoid shortcut ambiguity Task-number: QTCREATORBUG-13364 Change-Id: Ibce1701be72376845624856b5de097332aaaccae Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
895e0d8439
commit
a43f162d0a
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user