forked from qt-creator/qt-creator
more Id type fixes
Change-Id: I3720946ba5485696822976567d83b4d6cb1fb283 x Change-Id: Iab58bc34bc56371405d132315573b484a533b77c Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -89,7 +89,7 @@ bool ActionMacroHandler::executeEvent(const MacroEvent ¯oEvent)
|
||||
const Core::ICore *core = Core::ICore::instance();
|
||||
const Core::ActionManager *am = core->actionManager();
|
||||
|
||||
QAction *action = am->command(macroEvent.value(ACTIONNAME).toString())->action();
|
||||
QAction *action = am->command(Core::Id(macroEvent.value(ACTIONNAME).toString()))->action();
|
||||
if (!action)
|
||||
return false;
|
||||
|
||||
@@ -104,7 +104,7 @@ void ActionMacroHandler::addActionEvent(const QString &id)
|
||||
|
||||
const Core::ICore *core = Core::ICore::instance();
|
||||
const Core::ActionManager *am = core->actionManager();
|
||||
const Core::Command *cmd = am->command(id);
|
||||
const Core::Command *cmd = am->command(Core::Id(id));
|
||||
if (cmd->isScriptable(cmd->context())) {
|
||||
MacroEvent e;
|
||||
e.setId(EVENTNAME);
|
||||
@@ -119,13 +119,13 @@ void ActionMacroHandler::registerCommand(const QString &id)
|
||||
m_commandIds.insert(id);
|
||||
const Core::ICore *core = Core::ICore::instance();
|
||||
const Core::ActionManager *am = core->actionManager();
|
||||
QAction* action = am->command(id)->action();
|
||||
QAction* action = am->command(Core::Id(id))->action();
|
||||
if (action) {
|
||||
connect(action, SIGNAL(triggered()), m_mapper, SLOT(map()));
|
||||
m_mapper->setMapping(action, id);
|
||||
return;
|
||||
}
|
||||
QShortcut* shortcut = am->command(id)->shortcut();
|
||||
QShortcut* shortcut = am->command(Core::Id(id))->shortcut();
|
||||
if (shortcut) {
|
||||
connect(shortcut, SIGNAL(activated()), m_mapper, SLOT(map()));
|
||||
m_mapper->setMapping(shortcut, id);
|
||||
@@ -137,6 +137,6 @@ void ActionMacroHandler::addCommand(const QString &id)
|
||||
{
|
||||
const Core::ICore *core = Core::ICore::instance();
|
||||
const Core::ActionManager *am = core->actionManager();
|
||||
if (am->command(id)->isScriptable())
|
||||
if (am->command(Core::Id(id))->isScriptable())
|
||||
registerCommand(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user