QbsProjectManager: Fix crash when unloading a building project

Note that unloading a building project is generally broken in that the
build manager waits indefinitely for the build step's finished() signal,
but that's a general problem which needs to get addressed in a different
patch. This one fixes a qbs-specific crash.

Fixes: QTCREATORBUG-23851
Change-Id: I93e254acd1c73fe7495d01fcad04ea9301130dd0
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2020-04-14 13:34:49 +02:00
parent d973823dbb
commit 6c32656a21
5 changed files with 30 additions and 0 deletions

View File

@@ -539,6 +539,15 @@ QbsBuildStepData QbsBuildStep::stepData() const
return data;
}
void QbsBuildStep::dropSession()
{
if (m_session) {
doCancel();
m_session->disconnect(this);
m_session = nullptr;
}
}
// --------------------------------------------------------------------
// QbsBuildStepConfigWidget: