Less use of slow methods.

This commit is contained in:
con
2009-12-09 15:30:23 +01:00
parent 9097149cee
commit 3ab0a28cca
7 changed files with 12 additions and 13 deletions

View File

@@ -194,9 +194,10 @@ void ModeManager::addAction(Command *command, int priority, QMenu *menu)
// Count the number of commands with a higher priority
int index = 0;
foreach (int p, m_actions.values())
foreach (int p, m_actions) {
if (p > priority)
++index;
}
m_actionBar->insertAction(index, command->action(), menu);
}