diff options
author | hjk <[email protected]> | 2012-01-24 15:36:40 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2012-01-24 18:48:47 +0100 |
commit | 4a21f0c3c8b30cd0bc5957110506e304c629a99b (patch) | |
tree | 3d2477e3f1485ccaa319557bb2229e3f34324867 /src/plugins/macros/actionmacrohandler.cpp | |
parent | c14a4756a92586424f0f1a00c6134e441db50afd (diff) |
Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <[email protected]>
Diffstat (limited to 'src/plugins/macros/actionmacrohandler.cpp')
-rw-r--r-- | src/plugins/macros/actionmacrohandler.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/plugins/macros/actionmacrohandler.cpp b/src/plugins/macros/actionmacrohandler.cpp index 8253527b55e..3a009adbf10 100644 --- a/src/plugins/macros/actionmacrohandler.cpp +++ b/src/plugins/macros/actionmacrohandler.cpp @@ -64,8 +64,7 @@ ActionMacroHandler::ActionMacroHandler(): connect(m_mapper, SIGNAL(mapped(const QString &)), this, SLOT(addActionEvent(const QString &))); - const Core::ICore *core = Core::ICore::instance(); - const Core::ActionManager *am = core->actionManager(); + const Core::ActionManager *am = Core::ICore::actionManager(); connect(am, SIGNAL(commandAdded(QString)), this, SLOT(addCommand(QString))); @@ -86,8 +85,7 @@ bool ActionMacroHandler::canExecuteEvent(const MacroEvent ¯oEvent) bool ActionMacroHandler::executeEvent(const MacroEvent ¯oEvent) { - const Core::ICore *core = Core::ICore::instance(); - const Core::ActionManager *am = core->actionManager(); + const Core::ActionManager *am = Core::ICore::actionManager(); QAction *action = am->command(Core::Id(macroEvent.value(ACTIONNAME).toString()))->action(); if (!action) @@ -102,8 +100,7 @@ void ActionMacroHandler::addActionEvent(const QString &id) if (!isRecording()) return; - const Core::ICore *core = Core::ICore::instance(); - const Core::ActionManager *am = core->actionManager(); + const Core::ActionManager *am = Core::ICore::actionManager(); const Core::Command *cmd = am->command(Core::Id(id)); if (cmd->isScriptable(cmd->context())) { MacroEvent e; @@ -117,8 +114,7 @@ void ActionMacroHandler::registerCommand(const QString &id) { if (!m_commandIds.contains(id)) { m_commandIds.insert(id); - const Core::ICore *core = Core::ICore::instance(); - const Core::ActionManager *am = core->actionManager(); + const Core::ActionManager *am = Core::ICore::actionManager(); QAction* action = am->command(Core::Id(id))->action(); if (action) { connect(action, SIGNAL(triggered()), m_mapper, SLOT(map())); @@ -135,8 +131,7 @@ void ActionMacroHandler::registerCommand(const QString &id) void ActionMacroHandler::addCommand(const QString &id) { - const Core::ICore *core = Core::ICore::instance(); - const Core::ActionManager *am = core->actionManager(); + const Core::ActionManager *am = Core::ICore::actionManager(); if (am->command(Core::Id(id))->isScriptable()) registerCommand(id); } |