QmlJSEditor: do not wait for the semantic info update

... when destructing a qmljseditor. Just let the updater continue and
delete it once it finishes.

Fixes: QTCREATORBUG-28206
Change-Id: Icabe10f17b7bf326bb15e5ee622504c477d83acf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
David Schulz
2022-11-22 10:05:05 +01:00
parent a130a7ae0b
commit 1aa2d8ad30
3 changed files with 6 additions and 9 deletions

View File

@@ -483,7 +483,9 @@ QmlJSEditorDocumentPrivate::QmlJSEditorDocumentPrivate(QmlJSEditorDocument *pare
&Internal::QmlJSEditorDocumentPrivate::settingsChanged);
// semantic info
m_semanticInfoUpdater = new SemanticInfoUpdater(this);
m_semanticInfoUpdater = new SemanticInfoUpdater();
connect(m_semanticInfoUpdater, &SemanticInfoUpdater::finished,
m_semanticInfoUpdater, &QObject::deleteLater);
connect(m_semanticInfoUpdater, &SemanticInfoUpdater::updated,
this, &QmlJSEditorDocumentPrivate::acceptNewSemanticInfo);
m_semanticInfoUpdater->start();
@@ -509,7 +511,6 @@ QmlJSEditorDocumentPrivate::QmlJSEditorDocumentPrivate(QmlJSEditorDocument *pare
QmlJSEditorDocumentPrivate::~QmlJSEditorDocumentPrivate()
{
m_semanticInfoUpdater->abort();
m_semanticInfoUpdater->wait();
// clean up all marks, otherwise a callback could try to access deleted members.
// see QTCREATORBUG-20199
cleanDiagnosticMarks();