Fix a deadlock when closing Creator while loading a project

Replace the call to SynchronousProcess::run() by asynchronous
call that invokes a process.

This change may be tested by applying the additional patch
mentioned in QTCREATORBUG-25385 description.

Don't call the SynchronousProcess::run() from the main thread when
the Quit event was already scheduled for qApp, since the Quit event
will get removed from the awaiting queue by a call to
QEventLoop::exec().

Fixes: QTCREATORBUG-25385
Change-Id: I8af39552443bfa9b3af6e31ddce85a01b91bbbd8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2021-02-25 12:53:41 +01:00
parent 2de66272e8
commit 675a72e296
2 changed files with 58 additions and 32 deletions

View File

@@ -35,6 +35,8 @@
#include <utils/fileutils.h>
#include <utils/temporarydirectory.h>
#include <QFutureSynchronizer>
namespace ProjectExplorer { class ExtraCompiler; }
namespace CppTools {
@@ -181,6 +183,7 @@ private:
// CTest integration
QString m_ctestPath;
QList<ProjectExplorer::TestCaseInfo> m_testNames;
QFutureSynchronizer<QByteArray> m_futureSynchronizer;
};
} // namespace Internal