VcsCommand: Remove one runCommand() overload

Not used anymore after changing implementation of execute().

Change-Id: I0af0e61b3bd9184f30f11cd80d377d25acf805f8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-09-02 18:35:00 +02:00
parent d26dd8d641
commit 5047802f0a
3 changed files with 6 additions and 19 deletions

View File

@@ -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,

View File

@@ -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

View File

@@ -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.