forked from qt-creator/qt-creator
Replace QtcProcess::stopProcess() by stop() plus waitForFinished
... or nothing, if the process object is destroyed immediately. Change-Id: I6a1e1928bc49fc20a1c0e0ee9b8f4f723276bbca Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -368,7 +368,10 @@ void ShellCommand::runFullySynchronous(QtcProcess &process, const FilePath &work
|
||||
|
||||
void ShellCommand::runSynchronous(QtcProcess &process, const FilePath &workingDirectory)
|
||||
{
|
||||
connect(this, &ShellCommand::terminate, &process, &QtcProcess::stopProcess);
|
||||
connect(this, &ShellCommand::terminate, &process, [&process] {
|
||||
process.stop();
|
||||
process.waitForFinished();
|
||||
});
|
||||
process.setEnvironment(processEnvironment());
|
||||
if (d->m_codec)
|
||||
process.setCodec(d->m_codec);
|
||||
|
||||
Reference in New Issue
Block a user