diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2020-03-30 14:56:40 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2020-03-31 09:23:12 +0000 |
commit | 0880cfb75cbb054350c1dc4abd2057587e95bef2 (patch) | |
tree | 059dc423b4b10f09b0f9cd99768d3ef3434c91aa /src/plugins | |
parent | e0751d56d0994617a58a9e4ec903e76b36cd4f20 (diff) | |
download | qt-creator-0880cfb75cbb054350c1dc4abd2057587e95bef2.tar.gz |
TreeScanner: Do not trigger signals in destructor
Do not trigger signals in the destructor of the treescanner. The
object is not prepared to handle anyone reacting to that signal
anymore.
This fixes the crash described in QTCREATORBUG-23781.
Task-number: QTCREATORBUG-23781
Change-Id: Ia00173f8734461f1d484fa6f7a86f3a45f970e3f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/projectexplorer/treescanner.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/treescanner.cpp b/src/plugins/projectexplorer/treescanner.cpp index 7c7f634d1a..14f10c66db 100644 --- a/src/plugins/projectexplorer/treescanner.cpp +++ b/src/plugins/projectexplorer/treescanner.cpp @@ -51,6 +51,8 @@ TreeScanner::TreeScanner(QObject *parent) : QObject(parent) TreeScanner::~TreeScanner() { + disconnect(&m_futureWatcher, nullptr, nullptr, nullptr); // Do not trigger signals anymore! + if (!m_futureWatcher.isFinished()) { m_futureWatcher.cancel(); m_futureWatcher.waitForFinished(); |