forked from qt-creator/qt-creator
Use SynchronousProcess::runBlocking
Use SynchronousProcess::runBlocking in favor of SychronousProcess::run. This avoid nested event loops which can produce really strange crashes if not use carefully. This patch only converts those processes that have a timeout of less than 5 seconds or use the default timeout. Change-Id: I9de8899dcc946af7049ea357a91972996c0256a1 Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -109,7 +109,7 @@ Utils::SynchronousProcessResponse CMakeTool::run(const QString &arg) const
|
||||
cmake.setProcessEnvironment(env.toProcessEnvironment());
|
||||
cmake.setTimeOutMessageBoxEnabled(false);
|
||||
|
||||
Utils::SynchronousProcessResponse response = cmake.run(m_executable.toString(), QStringList() << arg);
|
||||
Utils::SynchronousProcessResponse response = cmake.runBlocking(m_executable.toString(), QStringList() << arg);
|
||||
m_didAttemptToRun = true;
|
||||
m_didRun = (response.result == Utils::SynchronousProcessResponse::Finished);
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user