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.