CppTools: Remove some duplication

Change-Id: I8c84660b28c3e76b2cedd08ff3b44a38583f38a0
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-12-14 18:58:23 +01:00
parent 5421615070
commit bd66d5ac05
15 changed files with 59 additions and 56 deletions

View File

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