forked from qt-creator/qt-creator
Core: Make Context parameter to registerAction optional
... and default to C_GLOBAL. A rather common case. Similar for ActionContainer::addSeparator(). Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -105,9 +105,8 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
|
||||
// Update context in global context
|
||||
m_resetCodeModelAction = new QAction(tr("Reset Code Model"), this);
|
||||
Context globalContext(Core::Constants::C_GLOBAL);
|
||||
Command *cmd = ActionManager::registerAction(
|
||||
m_resetCodeModelAction, Constants::RESET_CODEMODEL, globalContext);
|
||||
m_resetCodeModelAction, Constants::RESET_CODEMODEL);
|
||||
connect(m_resetCodeModelAction, &QAction::triggered,
|
||||
m_modelManager, &ModelManager::resetCodeModel);
|
||||
mqmljstools->addAction(cmd);
|
||||
|
||||
Reference in New Issue
Block a user