summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@nokia.com>2012-05-24 13:49:06 +0200
committerhjk <qthjk@ovi.com>2012-05-25 10:08:24 +0200
commit3934347fe9ed7e1567c3ff377f857928e8b03304 (patch)
tree09f1ccaf1af2d8032bb12ea0a5a05b4b4185d431 /src/plugins/cpptools/cpptoolsplugin.cpp
parent7c7ccdc764629042729ceede4ca3e47b464aee42 (diff)
downloadqt-creator-3934347fe9ed7e1567c3ff377f857928e8b03304.tar.gz
ActionManager API cleanup.
d-pointer instead of inheritance static methods Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258 Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index f33f40e5bf..377264c52f 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -102,8 +102,6 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
Q_UNUSED(arguments)
Q_UNUSED(error)
- Core::ActionManager *am = Core::ICore::actionManager();
-
m_settings = new CppToolsSettings(this); // force registration of cpp tools settings
// Objects
@@ -124,8 +122,8 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
addAutoReleasedObject(new CppCodeStyleSettingsPage);
// Menus
- Core::ActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS);
- Core::ActionContainer *mcpptools = am->createMenu(CppTools::Constants::M_TOOLS_CPP);
+ Core::ActionContainer *mtools = Core::ActionManager::actionContainer(Core::Constants::M_TOOLS);
+ Core::ActionContainer *mcpptools = Core::ActionManager::createMenu(CppTools::Constants::M_TOOLS_CPP);
QMenu *menu = mcpptools->menu();
menu->setTitle(tr("&C++"));
menu->setEnabled(true);
@@ -135,7 +133,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
Core::Context context(CppEditor::Constants::C_CPPEDITOR);
QAction *switchAction = new QAction(tr("Switch Header/Source"), this);
- Core::Command *command = am->registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context, true);
+ Core::Command *command = Core::ActionManager::registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context, true);
command->setDefaultKeySequence(QKeySequence(Qt::Key_F4));
mcpptools->addAction(command);
connect(switchAction, SIGNAL(triggered()), this, SLOT(switchHeaderSource()));