forked from qt-creator/qt-creator
Use Core::Id::withSuffix when appropriate
Change-Id: I919b9b5d8c3e2554cea6d0f5c1db85ed305a8015 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -157,7 +157,7 @@ void MacroManager::MacroManagerPrivate::initialize()
|
||||
|
||||
static Core::Id makeId(const QString &name)
|
||||
{
|
||||
return Core::Id::fromString(QLatin1String(Constants::PREFIX_MACRO) + name);
|
||||
return Core::Id(Constants::PREFIX_MACRO).withSuffix(name);
|
||||
}
|
||||
|
||||
void MacroManager::MacroManagerPrivate::addMacro(Macro *macro)
|
||||
|
||||
@@ -99,6 +99,7 @@ void MacroOptionsWidget::initialize()
|
||||
void MacroOptionsWidget::createTable()
|
||||
{
|
||||
QDir dir(MacroManager::instance()->macrosDirectory());
|
||||
const Core::Id base = Core::Id(Constants::PREFIX_MACRO);
|
||||
QMapIterator<QString, Macro *> it(MacroManager::instance()->macros());
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
@@ -111,8 +112,7 @@ void MacroOptionsWidget::createTable()
|
||||
macroItem->setData(0, WRITE_ROLE, it.value()->isWritable());
|
||||
|
||||
Core::Command *command =
|
||||
Core::ActionManager::command(Core::Id::fromString(QLatin1String(Constants::PREFIX_MACRO)
|
||||
+ it.value()->displayName()));
|
||||
Core::ActionManager::command(base.withSuffix(it.value()->displayName()));
|
||||
if (command && command->shortcut())
|
||||
macroItem->setText(2, command->shortcut()->key().toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user