From 3934347fe9ed7e1567c3ff377f857928e8b03304 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 24 May 2012 13:49:06 +0200 Subject: ActionManager API cleanup. d-pointer instead of inheritance static methods Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258 Reviewed-by: hjk --- src/plugins/cpptools/cpptoolsplugin.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp') 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())); -- cgit v1.2.1