summaryrefslogtreecommitdiff
path: root/src/plugins/qbsprojectmanager/qbscleanstep.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-04-14 13:34:49 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-04-14 15:15:27 +0000
commit6c32656a21ede948be7adf01fe94b4bfb77c45a4 (patch)
tree4db0940260a5e2b5371ffb24f654236b0fa62c09 /src/plugins/qbsprojectmanager/qbscleanstep.cpp
parentd973823dbbe275bb4935324d58392df5644e5ad4 (diff)
downloadqt-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.cpp9
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)