aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-06-10 10:02:44 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-06-10 14:43:26 +0000
commitbe0aa40520d8a133b1f975de8750b5b8e25da2be (patch)
treeac711c74a318f05126604eb7aa2907c94f7c47e5 /src/plugins/git
parent29b96af1cbcf2011ac7d57e74161c80513ab7c5a (diff)
Gerrit: Remove method that is used only once
Change-Id: I6a65cf7dcb2e5e0f0cff46fd11092799254023be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/git')
-rw-r--r--src/plugins/git/gerrit/gerritplugin.cpp14
-rw-r--r--src/plugins/git/gerrit/gerritplugin.h1
2 files changed, 4 insertions, 11 deletions
diff --git a/src/plugins/git/gerrit/gerritplugin.cpp b/src/plugins/git/gerrit/gerritplugin.cpp
index 33d99276edf..ea635022486 100644
--- a/src/plugins/git/gerrit/gerritplugin.cpp
+++ b/src/plugins/git/gerrit/gerritplugin.cpp
@@ -397,14 +397,6 @@ void GerritPlugin::push()
push(GitPlugin::instance()->currentState().topLevel());
}
-Utils::FileName GerritPlugin::gitBinary()
-{
- const Utils::FileName git = gitClient()->vcsBinary();
- if (git.isEmpty())
- VcsBase::VcsOutputWindow::appendError(tr("Git is not available."));
- return git;
-}
-
Utils::FileName GerritPlugin::gitBinDirectory()
{
return gitClient()->gitBinDirectory();
@@ -434,9 +426,11 @@ void GerritPlugin::fetchCheckout(const QSharedPointer<GerritChange> &change)
void GerritPlugin::fetch(const QSharedPointer<GerritChange> &change, int mode)
{
// Locate git.
- const Utils::FileName git = gitBinary();
- if (git.isEmpty())
+ const Utils::FileName git = gitClient()->vcsBinary();
+ if (git.isEmpty()) {
+ VcsBase::VcsOutputWindow::appendError(tr("Git is not available."));
return;
+ }
GitClient *client = gitClient();
diff --git a/src/plugins/git/gerrit/gerritplugin.h b/src/plugins/git/gerrit/gerritplugin.h
index 18e72835500..08db0587601 100644
--- a/src/plugins/git/gerrit/gerritplugin.h
+++ b/src/plugins/git/gerrit/gerritplugin.h
@@ -64,7 +64,6 @@ public:
bool initialize(Core::ActionContainer *ac);
- static Utils::FileName gitBinary();
static Utils::FileName gitBinDirectory();
static QString branch(const QString &repository);
void addToLocator(Core::CommandLocator *locator);