forked from qt-creator/qt-creator
Android: Fix a crash on Creator shutdown during app startup
The AndroidRunnerWorker lives in a separate thread created by AndroidRunner. Thus, we can't delete it directly from the AndroidRunner's d'tor. Instead, we connect to QThread's finished() signal and delete the worker later. Make m_pidRunner a child of AndroidRunnerWorker so that it's moved together with its parent to the other thread. Change-Id: I5c3723315ee5183fa8451f0706311b14f173dca1 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -203,6 +203,7 @@ AndroidRunnerWorker::AndroidRunnerWorker(RunWorker *runner, const QString &packa
|
||||
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
m_useAppParamsForQmlDebugger = version->qtVersion() >= QVersionNumber(5, 12);
|
||||
m_pidRunner.setParent(this); // Move m_pidRunner object together with *this into a separate thread.
|
||||
}
|
||||
|
||||
AndroidRunnerWorker::~AndroidRunnerWorker()
|
||||
|
||||
Reference in New Issue
Block a user