From 5047802f0a7fb942b4f1cee4db010264f68300d1 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 2 Sep 2022 18:35:00 +0200 Subject: [PATCH] VcsCommand: Remove one runCommand() overload Not used anymore after changing implementation of execute(). Change-Id: I0af0e61b3bd9184f30f11cd80d377d25acf805f8 Reviewed-by: Reviewed-by: Orgad Shaneh --- src/plugins/vcsbase/vcsbaseclient.h | 8 ++++---- src/plugins/vcsbase/vcscommand.cpp | 11 ++--------- src/plugins/vcsbase/vcscommand.h | 6 ------ 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/plugins/vcsbase/vcsbaseclient.h b/src/plugins/vcsbase/vcsbaseclient.h index 1bd0c78d93e..40f7db25319 100644 --- a/src/plugins/vcsbase/vcsbaseclient.h +++ b/src/plugins/vcsbase/vcsbaseclient.h @@ -77,11 +77,11 @@ public: // Fully synchronous VCS execution (QProcess-based) CommandResult vcsSynchronousExec(const Utils::FilePath &workingDir, - const QStringList &args, unsigned flags = 0, - int timeoutS = -1, QTextCodec *codec = nullptr) const; + const QStringList &args, unsigned flags = 0, + int timeoutS = -1, QTextCodec *codec = nullptr) const; CommandResult vcsSynchronousExec(const Utils::FilePath &workingDir, - const Utils::CommandLine &cmdLine, unsigned flags = 0, - int timeoutS = -1, QTextCodec *codec = nullptr) const; + const Utils::CommandLine &cmdLine, unsigned flags = 0, + int timeoutS = -1, QTextCodec *codec = nullptr) const; // Simple helper to execute a single command using createCommand and enqueueJob. VcsCommand *vcsExec(const Utils::FilePath &workingDirectory, diff --git a/src/plugins/vcsbase/vcscommand.cpp b/src/plugins/vcsbase/vcscommand.cpp index ffd6aae26f9..591b43e8676 100644 --- a/src/plugins/vcsbase/vcscommand.cpp +++ b/src/plugins/vcsbase/vcscommand.cpp @@ -368,20 +368,13 @@ void VcsCommand::cancel() emit terminate(); } -CommandResult VcsCommand::runCommand(const Utils::CommandLine &command, int timeoutS) -{ - return runCommand(command, timeoutS, d->m_defaultWorkingDirectory, {}); -} - -CommandResult VcsCommand::runCommand(const CommandLine &command, int timeoutS, - const FilePath &workingDirectory, - const ExitCodeInterpreter &interpreter) +CommandResult VcsCommand::runCommand(const CommandLine &command, int timeoutS) { QtcProcess proc; if (command.executable().isEmpty()) return {}; - d->setupProcess(&proc, {command, timeoutS, workingDirectory, interpreter}); + d->setupProcess(&proc, {command, timeoutS, d->m_defaultWorkingDirectory, {}}); if (d->isFullySynchronous()) runFullySynchronous(proc); else diff --git a/src/plugins/vcsbase/vcscommand.h b/src/plugins/vcsbase/vcscommand.h index 818eaf63c4c..5b52f74c3e4 100644 --- a/src/plugins/vcsbase/vcscommand.h +++ b/src/plugins/vcsbase/vcscommand.h @@ -132,12 +132,6 @@ signals: void runCommandFinished(const Utils::FilePath &workingDirectory); private: - // This is called once per job in a thread. - // When called from the UI thread it will execute fully synchronously, so no signals will - // be triggered! - CommandResult runCommand(const Utils::CommandLine &command, int timeoutS, - const Utils::FilePath &workingDirectory, - const Utils::ExitCodeInterpreter &interpreter); void postRunCommand(const Utils::FilePath &workingDirectory); // Run without a event loop in fully blocking mode. No signals will be delivered.