forked from qt-creator/qt-creator
Make it possible to specify shortcuts for Locator filters.
Task-number: QTCREATORBUG-1147
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user