diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2016-12-14 18:58:23 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2016-12-16 13:56:26 +0000 |
commit | bd66d5ac053db5f0b364d458e42f3c87432f8776 (patch) | |
tree | b9a16fb9393e3e3fbee6b68a0dab80e83f277fb1 /src/plugins/cpptools/baseeditordocumentprocessor.cpp | |
parent | 54216150703666a29a7f70060430370f7b15d4fa (diff) |
CppTools: Remove some duplication
Change-Id: I8c84660b28c3e76b2cedd08ff3b44a38583f38a0
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cpptools/baseeditordocumentprocessor.cpp')
-rw-r--r-- | src/plugins/cpptools/baseeditordocumentprocessor.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/cpptools/baseeditordocumentprocessor.cpp b/src/plugins/cpptools/baseeditordocumentprocessor.cpp index 69432dd6e2d..2051136133d 100644 --- a/src/plugins/cpptools/baseeditordocumentprocessor.cpp +++ b/src/plugins/cpptools/baseeditordocumentprocessor.cpp @@ -29,6 +29,7 @@ #include "cpptoolsbridge.h" #include "editordocumenthandle.h" +#include <projectexplorer/session.h> #include <texteditor/quickfix.h> namespace CppTools { @@ -52,6 +53,12 @@ BaseEditorDocumentProcessor::~BaseEditorDocumentProcessor() { } +void BaseEditorDocumentProcessor::run() +{ + runImpl({CppModelManager::instance()->workingCopy(), + ProjectExplorer::SessionManager::startupProject()}); +} + TextEditor::QuickFixOperations BaseEditorDocumentProcessor::extraRefactoringOperations(const TextEditor::AssistInterface &) { @@ -73,8 +80,7 @@ void BaseEditorDocumentProcessor::editorDocumentTimerRestarted() void BaseEditorDocumentProcessor::runParser(QFutureInterface<void> &future, BaseEditorDocumentParser::Ptr parser, - const WorkingCopy workingCopy, - const ProjectExplorer::Project *activeProject) + BaseEditorDocumentParser::UpdateParams updateParams) { future.setProgressRange(0, 1); if (future.isCanceled()) { @@ -82,7 +88,7 @@ void BaseEditorDocumentProcessor::runParser(QFutureInterface<void> &future, return; } - parser->update(future, workingCopy, activeProject); + parser->update(future, updateParams); CppToolsBridge::finishedRefreshingSourceFiles({parser->filePath()}); future.setProgressValue(1); |