From e653b7054a0272b456f4859f4546d32d14392c2b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@nokia.com> Date: Fri, 25 Sep 2009 13:46:49 +0200 Subject: [PATCH] git: Remove duplicate action. --- src/plugins/git/gitplugin.cpp | 9 --------- src/plugins/git/gitplugin.h | 1 - 2 files changed, 10 deletions(-) diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index b0741ce867a..0324e1b7c80 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -129,7 +129,6 @@ GitPlugin::GitPlugin() : m_showAction(0), m_stageAction(0), m_unstageAction(0), - m_revertAction(0), m_commitAction(0), m_pullAction(0), m_pushAction(0), @@ -298,12 +297,6 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) connect(m_unstageAction, SIGNAL(triggered()), this, SLOT(unstageFile())); gitContainer->addAction(command); - m_revertAction = new Core::Utils::ParameterAction(tr("Revert..."), tr("Revert \"%1\"..."), Core::Utils::ParameterAction::AlwaysEnabled, this); - command = actionManager->registerAction(m_revertAction, "Git.Revert", globalcontext); - command->setAttribute(Core::Command::CA_UpdateText); - connect(m_revertAction, SIGNAL(triggered()), this, SLOT(revertFile())); - gitContainer->addAction(command); - gitContainer->addAction(createSeparator(actionManager, globalcontext, QLatin1String("Git.Sep.Project"), this)); m_diffProjectAction = new Core::Utils::ParameterAction(tr("Diff Current Project"), tr("Diff Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this); @@ -756,7 +749,6 @@ void GitPlugin::updateActions() m_undoFileAction->setParameter(fileName); m_stageAction->setParameter(fileName); m_unstageAction->setParameter(fileName); - m_revertAction->setParameter(fileName); bool enabled = !fileName.isEmpty() && !repository.isEmpty(); m_diffAction->setEnabled(enabled); @@ -766,7 +758,6 @@ void GitPlugin::updateActions() m_undoFileAction->setEnabled(enabled); m_stageAction->setEnabled(enabled); m_unstageAction->setEnabled(enabled); - m_revertAction->setEnabled(enabled); if (repository.isEmpty()) { // If the file is not in a repository, the corresponding project will diff --git a/src/plugins/git/gitplugin.h b/src/plugins/git/gitplugin.h index bf3eb3e28ff..116d8f6638b 100644 --- a/src/plugins/git/gitplugin.h +++ b/src/plugins/git/gitplugin.h @@ -145,7 +145,6 @@ private: QAction *m_showAction; Core::Utils::ParameterAction *m_stageAction; Core::Utils::ParameterAction *m_unstageAction; - Core::Utils::ParameterAction *m_revertAction; QAction *m_commitAction; QAction *m_pullAction; QAction *m_pushAction; -- GitLab