ClangCodeModel: Use Utils::runAsync

Avoids global thread pool and is better maintainable

Change-Id: I5d5ffe66918a3e0ec95c1ab7c6b9d964f7a8de2f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Eike Ziller
2016-02-12 09:46:22 +01:00
parent 6c382e134b
commit 6dbbc96112

View File

@@ -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