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/helloworld/helloworldplugin.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins/helloworld/helloworldplugin.cpp') diff --git a/src/plugins/helloworld/helloworldplugin.cpp b/src/plugins/helloworld/helloworldplugin.cpp index 64fb34d1e0..7c3f175137 100644 --- a/src/plugins/helloworld/helloworldplugin.cpp +++ b/src/plugins/helloworld/helloworldplugin.cpp @@ -105,14 +105,13 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *errorMe connect(helloWorldAction, SIGNAL(triggered()), SLOT(sayHelloWorld())); // Register the action with the action manager - Core::ActionManager *actionManager = Core::ICore::actionManager(); Core::Command *command = - actionManager->registerAction( + Core::ActionManager::registerAction( helloWorldAction, "HelloWorld.HelloWorldAction", context); // Create our own menu to place in the Tools menu Core::ActionContainer *helloWorldMenu = - actionManager->createMenu("HelloWorld.HelloWorldMenu"); + Core::ActionManager::createMenu("HelloWorld.HelloWorldMenu"); QMenu *menu = helloWorldMenu->menu(); menu->setTitle(tr("&Hello World")); menu->setEnabled(true); @@ -122,7 +121,7 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *errorMe // Request the Tools menu and add the Hello World menu to it Core::ActionContainer *toolsMenu = - actionManager->actionContainer(Core::Constants::M_TOOLS); + Core::ActionManager::actionContainer(Core::Constants::M_TOOLS); toolsMenu->addMenu(helloWorldMenu); // Add a mode with a push button based on BaseMode. Like the BaseView, -- cgit v1.2.1