aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmljseditor
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2021-05-12 15:12:48 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2021-05-12 22:08:02 +0000
commit91f136ef3ab75471cabcaed9dc16dad9f504add8 (patch)
tree26d526ba5f2906feeb87776f528c84331a5d46de /src/plugins/qmljseditor
parent3823b0af5ff928b7520bebfa05b5bcbb72fec0d9 (diff)
Use Utils::FutureSynchronizer instead of QFutureSynchronizer
Change-Id: Iecfa676f58e5ca82be7c9c94233dcc8d3654c2d7 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/plugins/qmljseditor')
-rw-r--r--src/plugins/qmljseditor/qmljssemantichighlighter.cpp2
-rw-r--r--src/plugins/qmljseditor/qmljssemantichighlighter.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp
index 2e05c7aba0b..9db93925a34 100644
--- a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp
+++ b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp
@@ -568,7 +568,7 @@ void SemanticHighlighter::rerun(const QmlJSTools::SemanticInfo &semanticInfo)
auto future = Utils::runAsync(QThread::LowestPriority, &SemanticHighlighter::run,
this, semanticInfo);
m_watcher.setFuture(future);
- m_futureSynchronizer.addFuture(QFuture<void>(future));
+ m_futureSynchronizer.addFuture(future);
}
void SemanticHighlighter::cancel()
diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.h b/src/plugins/qmljseditor/qmljssemantichighlighter.h
index ffa45bbaace..f36b9b5518a 100644
--- a/src/plugins/qmljseditor/qmljssemantichighlighter.h
+++ b/src/plugins/qmljseditor/qmljssemantichighlighter.h
@@ -27,7 +27,7 @@
#include <qmljseditor/qmljseditor_global.h>
#include <texteditor/semantichighlighter.h>
-#include <QFutureSynchronizer>
+#include <utils/futuresynchronizer.h>
#include <QFutureWatcher>
#include <QTextLayout>
#include <QVector>
@@ -90,7 +90,7 @@ private:
QHash<int, QTextCharFormat> m_formats;
QHash<int, QTextCharFormat> m_extraFormats;
QVector<QTextLayout::FormatRange> m_diagnosticRanges;
- QFutureSynchronizer<void> m_futureSynchronizer;
+ Utils::FutureSynchronizer m_futureSynchronizer;
};
} // namespace QmlJSEditor