From dd7c2e622e5452d369eb8b0feec9e61df2ac18c5 Mon Sep 17 00:00:00 2001 From: Petar Perisin <petar.perisin@gmail.com> Date: Mon, 3 Jun 2013 23:16:49 +0200 Subject: [PATCH] Git - refactor executeGit and remove unnecessary args Change-Id: Idf770a20db66191b4d7fe3a704d31bdce70505c5 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> --- src/plugins/git/gitclient.cpp | 10 ++++------ src/plugins/git/gitclient.h | 4 +--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index ecd0e71f4f4..c647d81f61c 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -1245,7 +1245,7 @@ void GitClient::blame(const QString &workingDirectory, arguments << QLatin1String("--") << fileName; if (!revision.isEmpty()) arguments << revision; - executeGit(workingDirectory, arguments, editor, false, VcsBase::Command::NoReport, lineNumber); + executeGit(workingDirectory, arguments, editor, false, lineNumber); } bool GitClient::synchronousCheckout(const QString &workingDirectory, @@ -2130,15 +2130,13 @@ VcsBase::Command *GitClient::executeGit(const QString &workingDirectory, const QStringList &arguments, VcsBase::VcsBaseEditorWidget* editor, bool useOutputToWindow, - VcsBase::Command::TerminationReportMode tm, - int editorLineNumber, - bool unixTerminalDisabled) + int editorLineNumber) { outputWindow()->appendCommand(workingDirectory, settings()->stringValue(GitSettings::binaryPathKey), arguments); VcsBase::Command *command = createCommand(workingDirectory, editor, useOutputToWindow, editorLineNumber); command->addJob(arguments, settings()->intValue(GitSettings::timeoutKey)); - command->setTerminationReportMode(tm); - command->setUnixTerminalDisabled(unixTerminalDisabled); + command->setTerminationReportMode(VcsBase::Command::NoReport); + command->setUnixTerminalDisabled(false); command->execute(); return command; } diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index ef0c1ec31af..79faf47c4bc 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -356,9 +356,7 @@ private: const QStringList &arguments, VcsBase::VcsBaseEditorWidget* editor = 0, bool useOutputToWindow = false, - VcsBase::Command::TerminationReportMode tm = VcsBase::Command::NoReport, - int editorLineNumber = -1, - bool unixTerminalDisabled = false); + int editorLineNumber = -1); // Fully synchronous git execution (QProcess-based). bool fullySynchronousGit(const QString &workingDirectory, -- GitLab