Make it possible to specify shortcuts for Locator filters.

Task-number: QTCREATORBUG-1147
This commit is contained in:
con
2010-12-06 17:21:03 +01:00
parent bada915c35
commit 90ecb036a2
12 changed files with 136 additions and 11 deletions

View File

@@ -495,6 +495,20 @@ void Action::addOverrideAction(QAction *action, const Core::Context &context)
}
}
void Action::removeOverrideAction(QAction *action)
{
QMutableMapIterator<int, QPointer<QAction> > it(m_contextActionMap);
while (it.hasNext()) {
it.next();
if (it.value() == 0) {
it.remove();
} else if (it.value() == action) {
it.remove();
}
}
setCurrentContext(m_context);
}
void Action::actionChanged()
{
if (hasAttribute(CA_UpdateIcon)) {
@@ -535,3 +549,8 @@ void Action::setActive(bool state)
}
}
bool Action::isEmpty() const
{
return m_contextActionMap.isEmpty();
}