diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-04-14 13:34:49 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-04-14 15:15:27 +0000 |
commit | 6c32656a21ede948be7adf01fe94b4bfb77c45a4 (patch) | |
tree | 4db0940260a5e2b5371ffb24f654236b0fa62c09 /src/plugins/qbsprojectmanager/qbscleanstep.cpp | |
parent | d973823dbbe275bb4935324d58392df5644e5ad4 (diff) | |
download | qt-creator-6c32656a21ede948be7adf01fe94b4bfb77c45a4.tar.gz |
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>
Diffstat (limited to 'src/plugins/qbsprojectmanager/qbscleanstep.cpp')
-rw-r--r-- | src/plugins/qbsprojectmanager/qbscleanstep.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/qbsprojectmanager/qbscleanstep.cpp b/src/plugins/qbsprojectmanager/qbscleanstep.cpp index f6753fa411..07adf568d2 100644 --- a/src/plugins/qbsprojectmanager/qbscleanstep.cpp +++ b/src/plugins/qbsprojectmanager/qbscleanstep.cpp @@ -85,6 +85,15 @@ QbsCleanStep::~QbsCleanStep() m_session->disconnect(this); } +void QbsCleanStep::dropSession() +{ + if (m_session) { + doCancel(); + m_session->disconnect(this); + m_session = nullptr; + } +} + bool QbsCleanStep::init() { if (buildSystem()->isParsing() || m_session) |