forked from qt-creator/qt-creator
Don't kill the QProcess instance which is running in other thread
The main thread doesn't kill processes directly, but
sets just the cancel flag.
Instead of waiting infinitely long for a process to finish
we poll periodically (every 100ms) for the canceled flag
inside the thread that started the process.
Amends: a30aa4421a
Task-number: QTCREATORBUG-26333
Change-Id: I599d5c6cd69381cadc4a01c65f6a79f9a9bbd3fb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -674,8 +674,9 @@ void QmakeBuildSystem::asyncUpdate()
|
||||
connect(watcher, &QFutureWatcher<void>::canceled, this, [this, watcher] {
|
||||
if (!m_qmakeGlobals)
|
||||
return;
|
||||
watcher->disconnect();
|
||||
m_qmakeGlobals->killProcesses();
|
||||
watcher->disconnect();
|
||||
watcher->deleteLater();
|
||||
});
|
||||
connect(watcher, &QFutureWatcher<void>::finished, this, [watcher] {
|
||||
watcher->disconnect();
|
||||
|
||||
Reference in New Issue
Block a user