diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2021-05-10 18:05:50 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2021-05-11 10:03:16 +0000 |
commit | 1e263274720ea7b73530bd9f249655f783b56efe (patch) | |
tree | fef3222f9ac55fae146ad712ce17b02812334981 /src/plugins/qmljseditor/qmljssemantichighlighter.h | |
parent | b66a403f36c789471662634e8fb57406c78823e4 (diff) | |
download | qt-creator-1e263274720ea7b73530bd9f249655f783b56efe.tar.gz |
Synchronize all started threads in SemanticHighlighter d'tor
This fixes a possible crash on session switch or on shutdown.
Task-number: QTCREATORBUG-25708
Change-Id: I5dcc2420dca27b9856f47616c6f465ae8f059942
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmljseditor/qmljssemantichighlighter.h')
-rw-r--r-- | src/plugins/qmljseditor/qmljssemantichighlighter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.h b/src/plugins/qmljseditor/qmljssemantichighlighter.h index 77ea2a7c12..ffa45bbaac 100644 --- a/src/plugins/qmljseditor/qmljssemantichighlighter.h +++ b/src/plugins/qmljseditor/qmljssemantichighlighter.h @@ -27,6 +27,7 @@ #include <qmljseditor/qmljseditor_global.h> #include <texteditor/semantichighlighter.h> +#include <QFutureSynchronizer> #include <QFutureWatcher> #include <QTextLayout> #include <QVector> @@ -89,6 +90,7 @@ private: QHash<int, QTextCharFormat> m_formats; QHash<int, QTextCharFormat> m_extraFormats; QVector<QTextLayout::FormatRange> m_diagnosticRanges; + QFutureSynchronizer<void> m_futureSynchronizer; }; } // namespace QmlJSEditor |