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:
@@ -279,9 +279,6 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
initializeVcs(new GitVersionControl(m_gitClient), context);
|
||||
|
||||
// Create the contexts to register actions accordingly
|
||||
Context globalcontext(Core::Constants::C_GLOBAL);
|
||||
|
||||
// Create the settings Page
|
||||
addAutoReleasedObject(new SettingsPage());
|
||||
|
||||
@@ -631,7 +628,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
m_createRepositryAction = new QAction(tr("Create Repository..."), this);
|
||||
Command *createRepositoryCommand = ActionManager::registerAction(
|
||||
m_createRepositryAction, "Git.CreateRepository", globalcontext);
|
||||
m_createRepositryAction, "Git.CreateRepository");
|
||||
connect(m_createRepositryAction, SIGNAL(triggered()), this, SLOT(createRepository()));
|
||||
gitContainer->addAction(createRepositoryCommand);
|
||||
|
||||
|
Reference in New Issue
Block a user