ActionManager API cleanup.

d-pointer instead of inheritance
static methods

Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Eike Ziller
2012-05-24 13:49:06 +02:00
committed by hjk
parent 7c7ccdc764
commit 3934347fe9
78 changed files with 1198 additions and 1338 deletions

View File

@@ -77,8 +77,6 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error)
Q_UNUSED(arguments)
Q_UNUSED(error)
Core::ActionManager *am = Core::ICore::actionManager();
m_settings = new QmlJSToolsSettings(this); // force registration of qmljstools settings
// Objects
@@ -96,8 +94,8 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error)
addAutoReleasedObject(new QmlJSCodeStyleSettingsPage);
// Menus
Core::ActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS);
Core::ActionContainer *mqmljstools = am->createMenu(Constants::M_TOOLS_QMLJS);
Core::ActionContainer *mtools = Core::ActionManager::actionContainer(Core::Constants::M_TOOLS);
Core::ActionContainer *mqmljstools = Core::ActionManager::createMenu(Constants::M_TOOLS_QMLJS);
QMenu *menu = mqmljstools->menu();
menu->setTitle(tr("&QML/JS"));
menu->setEnabled(true);
@@ -106,7 +104,8 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error)
// Update context in global context
m_resetCodeModelAction = new QAction(tr("Reset Code Model"), this);
Core::Context globalContext(Core::Constants::C_GLOBAL);
Core::Command *cmd = am->registerAction(m_resetCodeModelAction, Core::Id(Constants::RESET_CODEMODEL), globalContext);
Core::Command *cmd = Core::ActionManager::registerAction(
m_resetCodeModelAction, Core::Id(Constants::RESET_CODEMODEL), globalContext);
connect(m_resetCodeModelAction, SIGNAL(triggered()), m_modelManager, SLOT(resetCodeModel()));
mqmljstools->addAction(cmd);