forked from qt-creator/qt-creator
CppTools: Remove some duplication
Change-Id: I8c84660b28c3e76b2cedd08ff3b44a38583f38a0 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -46,8 +46,6 @@
|
||||
#include <cpptools/cppworkingcopy.h>
|
||||
#include <cpptools/editordocumenthandle.h>
|
||||
|
||||
#include <projectexplorer/session.h>
|
||||
|
||||
#include <texteditor/convenience.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
@@ -103,7 +101,8 @@ ClangEditorDocumentProcessor::~ClangEditorDocumentProcessor()
|
||||
}
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::run()
|
||||
void ClangEditorDocumentProcessor::runImpl(
|
||||
const CppTools::BaseEditorDocumentParser::UpdateParams &updateParams)
|
||||
{
|
||||
m_updateTranslationUnitTimer.start();
|
||||
|
||||
@@ -116,13 +115,7 @@ void ClangEditorDocumentProcessor::run()
|
||||
m_parserRevision = revision();
|
||||
connect(&m_parserWatcher, &QFutureWatcher<void>::finished,
|
||||
this, &ClangEditorDocumentProcessor::onParserFinished);
|
||||
const CppTools::WorkingCopy workingCopy = CppTools::CppModelManager::instance()->workingCopy();
|
||||
const ProjectExplorer::Project *activeProject
|
||||
= ProjectExplorer::SessionManager::startupProject();
|
||||
const QFuture<void> future = ::Utils::runAsync(&runParser,
|
||||
parser(),
|
||||
workingCopy,
|
||||
activeProject);
|
||||
const QFuture<void> future = ::Utils::runAsync(&runParser, parser(), updateParams);
|
||||
m_parserWatcher.setFuture(future);
|
||||
|
||||
// Run builtin processor
|
||||
|
||||
Reference in New Issue
Block a user