forked from qt-creator/qt-creator
All: Replace most SynchronousProcess by QtcProcess
Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -272,7 +272,7 @@ void ShellCommand::run(QFutureInterface<void> &future)
|
||||
d->m_lastExecSuccess = true;
|
||||
for (int j = 0; j < count; j++) {
|
||||
const Internal::ShellCommandPrivate::Job &job = d->m_jobs.at(j);
|
||||
SynchronousProcess proc;
|
||||
QtcProcess proc;
|
||||
proc.setExitCodeInterpreter(job.exitCodeInterpreter);
|
||||
proc.setTimeoutS(job.timeoutS);
|
||||
runCommand(proc, job.command, job.workingDirectory);
|
||||
@@ -306,7 +306,7 @@ void ShellCommand::run(QFutureInterface<void> &future)
|
||||
this->deleteLater();
|
||||
}
|
||||
|
||||
void ShellCommand::runCommand(SynchronousProcess &proc,
|
||||
void ShellCommand::runCommand(QtcProcess &proc,
|
||||
const CommandLine &command,
|
||||
const QString &workingDirectory)
|
||||
{
|
||||
@@ -340,7 +340,7 @@ void ShellCommand::runCommand(SynchronousProcess &proc,
|
||||
}
|
||||
}
|
||||
|
||||
void ShellCommand::runFullySynchronous(SynchronousProcess &process,
|
||||
void ShellCommand::runFullySynchronous(QtcProcess &process,
|
||||
const QString &workingDirectory)
|
||||
{
|
||||
// Set up process
|
||||
@@ -372,10 +372,10 @@ void ShellCommand::runFullySynchronous(SynchronousProcess &process,
|
||||
}
|
||||
}
|
||||
|
||||
void ShellCommand::runSynchronous(SynchronousProcess &process,
|
||||
void ShellCommand::runSynchronous(QtcProcess &process,
|
||||
const QString &workingDirectory)
|
||||
{
|
||||
connect(this, &ShellCommand::terminate, &process, &SynchronousProcess::stopProcess);
|
||||
connect(this, &ShellCommand::terminate, &process, &QtcProcess::stopProcess);
|
||||
process.setEnvironment(processEnvironment());
|
||||
if (d->m_codec)
|
||||
process.setCodec(d->m_codec);
|
||||
|
||||
Reference in New Issue
Block a user