Commit 6dbbc961 authored by Eike Ziller's avatar Eike Ziller

ClangCodeModel: Use Utils::runAsync

Avoids global thread pool and is better maintainable

Change-Id: I5d5ffe66918a3e0ec95c1ab7c6b9d964f7a8de2f
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent 6c382e13
......@@ -52,7 +52,7 @@
#include <utils/qtcassert.h>
#include <utils/tooltip/tooltip.h>
#include <utils/QtConcurrentTools>
#include <utils/runextensions.h>
#include <QTextBlock>
......@@ -103,7 +103,7 @@ void ClangEditorDocumentProcessor::run()
connect(&m_parserWatcher, &QFutureWatcher<void>::finished,
this, &ClangEditorDocumentProcessor::onParserFinished);
const CppTools::WorkingCopy workingCopy = CppTools::CppModelManager::instance()->workingCopy();
const QFuture<void> future = QtConcurrent::run(&runParser, parser(), workingCopy);
const QFuture<void> future = ::Utils::runAsync(&runParser, parser(), workingCopy);
m_parserWatcher.setFuture(future);
// Run builtin processor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment