Git: Make "Create Repository" action local

Change-Id: Id52d145ca6a8120fb28c6a800bfd4ac497e4260d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Robert Loehning
2016-02-03 16:24:36 +01:00
parent 5c81e26a72
commit fa3a35e346
2 changed files with 3 additions and 5 deletions

View File

@@ -593,10 +593,10 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
createRepositoryAction(gitContainer, tr("Actions on Commits..."), "Git.ChangeActions", createRepositoryAction(gitContainer, tr("Actions on Commits..."), "Git.ChangeActions",
context, false, [this] { startChangeRelatedAction("Git.ChangeActions"); }); context, false, [this] { startChangeRelatedAction("Git.ChangeActions"); });
m_createRepositryAction = new QAction(tr("Create Repository..."), this); QAction *createRepositoryAction = new QAction(tr("Create Repository..."), this);
Command *createRepositoryCommand = ActionManager::registerAction( Command *createRepositoryCommand = ActionManager::registerAction(
m_createRepositryAction, "Git.CreateRepository"); createRepositoryAction, "Git.CreateRepository");
connect(m_createRepositryAction, &QAction::triggered, this, &GitPlugin::createRepository); connect(createRepositoryAction, &QAction::triggered, this, &GitPlugin::createRepository);
gitContainer->addAction(createRepositoryCommand); gitContainer->addAction(createRepositoryCommand);
// Submit editor // Submit editor
@@ -1273,7 +1273,6 @@ void GitPlugin::updateActions(VcsBasePlugin::ActionState as)
m_remoteDialog->refresh(currentState().topLevel(), false); m_remoteDialog->refresh(currentState().topLevel(), false);
m_commandLocator->setEnabled(repositoryEnabled); m_commandLocator->setEnabled(repositoryEnabled);
m_createRepositryAction->setEnabled(true);
if (!enableMenuAction(as, m_menuAction)) if (!enableMenuAction(as, m_menuAction))
return; return;
if (repositoryEnabled) if (repositoryEnabled)

View File

@@ -210,7 +210,6 @@ private:
QAction *m_continueRevertAction; QAction *m_continueRevertAction;
QAction *m_fixupCommitAction; QAction *m_fixupCommitAction;
QAction *m_interactiveRebaseAction; QAction *m_interactiveRebaseAction;
QAction *m_createRepositryAction;
QVector<Utils::ParameterAction *> m_fileActions; QVector<Utils::ParameterAction *> m_fileActions;
QVector<Utils::ParameterAction *> m_projectActions; QVector<Utils::ParameterAction *> m_projectActions;