diff --git a/src/plugins/cppeditor/cppcodemodelinspectordialog.cpp b/src/plugins/cppeditor/cppcodemodelinspectordialog.cpp index 3e6b6b3418a..0cc424c5676 100644 --- a/src/plugins/cppeditor/cppcodemodelinspectordialog.cpp +++ b/src/plugins/cppeditor/cppcodemodelinspectordialog.cpp @@ -1362,7 +1362,7 @@ void CppCodeModelInspectorDialog::refresh() if (editor) { editorSupport = cmmi->cppEditorSupport(editor); if (editorSupport) { - const CPlusPlus::Snapshot editorSnapshot = editorSupport->snapshotUpdater()->snapshot(); + const CPlusPlus::Snapshot editorSnapshot = editorSupport->documentParser()->snapshot(); m_snapshotInfos->append(SnapshotInfo(editorSnapshot, SnapshotInfo::EditorSnapshot)); const QString editorSnapshotTitle = QString::fromLatin1("Current Editor's Snapshot (%1 Documents)") @@ -1413,7 +1413,7 @@ void CppCodeModelInspectorDialog::refresh() // Project Parts const ProjectPart::Ptr editorsProjectPart = editorSupport - ? editorSupport->snapshotUpdater()->projectPart() + ? editorSupport->documentParser()->projectPart() : ProjectPart::Ptr(); const QList projectInfos = cmmi->projectInfos(); diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index b9291961a18..f6e71d0253a 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -1020,10 +1020,10 @@ void CppEditorWidget::onFilePathChanged() additionalDirectives = ProjectExplorer::SessionManager::value( projectFile + QLatin1Char(',') + filePath).toString().toUtf8(); - QSharedPointer updater - = d->m_modelManager->cppEditorSupport(editor())->snapshotUpdater(); - updater->setProjectPart(d->m_modelManager->projectPartForProjectFile(projectFile)); - updater->setEditorDefines(additionalDirectives); + QSharedPointer parser + = d->m_modelManager->cppEditorSupport(editor())->documentParser(); + parser->setProjectPart(d->m_modelManager->projectPartForProjectFile(projectFile)); + parser->setEditorDefines(additionalDirectives); } d->m_preprocessorButton->setProperty("highlightWidget", !additionalDirectives.trimmed().isEmpty()); d->m_preprocessorButton->update(); @@ -1088,12 +1088,12 @@ void CppEditorWidget::showPreProcessorWidget() CppPreProcessorDialog preProcessorDialog(this, textDocument()->filePath(), projectParts); if (preProcessorDialog.exec() == QDialog::Accepted) { - QSharedPointer updater - = d->m_modelManager->cppEditorSupport(editor())->snapshotUpdater(); + QSharedPointer parser + = d->m_modelManager->cppEditorSupport(editor())->documentParser(); const QString &additionals = preProcessorDialog.additionalPreProcessorDirectives(); - updater->setProjectPart(preProcessorDialog.projectPart()); - updater->setEditorDefines(additionals.toUtf8()); - updater->update(d->m_modelManager->workingCopy()); + parser->setProjectPart(preProcessorDialog.projectPart()); + parser->setEditorDefines(additionals.toUtf8()); + parser->update(d->m_modelManager->workingCopy()); d->m_preprocessorButton->setProperty("highlightWidget", !additionals.trimmed().isEmpty()); d->m_preprocessorButton->update(); diff --git a/src/plugins/cppeditor/cppincludehierarchymodel.cpp b/src/plugins/cppeditor/cppincludehierarchymodel.cpp index ead5ad98f8f..ac5e2e26e6e 100644 --- a/src/plugins/cppeditor/cppincludehierarchymodel.cpp +++ b/src/plugins/cppeditor/cppincludehierarchymodel.cpp @@ -243,7 +243,7 @@ void CppIncludeHierarchyModel::buildHierarchyIncludes_helper(const QString &file return; CppModelManagerInterface *cppMM = CppModelManagerInterface::instance(); - const Snapshot &snapshot = cppMM->cppEditorSupport(m_editor)->snapshotUpdater()->snapshot(); + const Snapshot &snapshot = cppMM->cppEditorSupport(m_editor)->documentParser()->snapshot(); Document::Ptr doc = snapshot.document(filePath); if (!doc) return; diff --git a/src/plugins/cpptools/cppsnapshotupdater.cpp b/src/plugins/cpptools/builtineditordocumentparser.cpp similarity index 91% rename from src/plugins/cpptools/cppsnapshotupdater.cpp rename to src/plugins/cpptools/builtineditordocumentparser.cpp index 8883a567f93..a52659d4c64 100644 --- a/src/plugins/cpptools/cppsnapshotupdater.cpp +++ b/src/plugins/cpptools/builtineditordocumentparser.cpp @@ -27,8 +27,8 @@ ** ****************************************************************************/ +#include "builtineditordocumentparser.h" #include "cppsourceprocessor.h" -#include "cppsnapshotupdater.h" #include @@ -36,14 +36,14 @@ using namespace CPlusPlus; using namespace CppTools; using namespace CppTools::Internal; -SnapshotUpdater::SnapshotUpdater(const QString &filePath) +BuiltinEditorDocumentParser::BuiltinEditorDocumentParser(const QString &filePath) : BaseEditorDocumentParser(filePath) , m_forceSnapshotInvalidation(false) , m_releaseSourceAndAST(true) { } -void SnapshotUpdater::update(WorkingCopy workingCopy) +void BuiltinEditorDocumentParser::update(WorkingCopy workingCopy) { QMutexLocker locker(&m_mutex); @@ -189,7 +189,7 @@ void SnapshotUpdater::update(WorkingCopy workingCopy) } } -void SnapshotUpdater::releaseResources() +void BuiltinEditorDocumentParser::releaseResources() { QMutexLocker locker(&m_mutex); m_snapshot = Snapshot(); @@ -197,31 +197,32 @@ void SnapshotUpdater::releaseResources() m_forceSnapshotInvalidation = true; } -Document::Ptr SnapshotUpdater::document() const +Document::Ptr BuiltinEditorDocumentParser::document() const { QMutexLocker locker(&m_mutex); return m_snapshot.document(filePath()); } -Snapshot SnapshotUpdater::snapshot() const +Snapshot BuiltinEditorDocumentParser::snapshot() const { QMutexLocker locker(&m_mutex); return m_snapshot; } -ProjectPart::HeaderPaths SnapshotUpdater::headerPaths() const +ProjectPart::HeaderPaths BuiltinEditorDocumentParser::headerPaths() const { QMutexLocker locker(&m_mutex); return m_headerPaths; } -void SnapshotUpdater::setReleaseSourceAndAST(bool onoff) +void BuiltinEditorDocumentParser::setReleaseSourceAndAST(bool onoff) { QMutexLocker locker(&m_mutex); m_releaseSourceAndAST = onoff; } -void SnapshotUpdater::addFileAndDependencies(QSet *toRemove, const QString &fileName) const +void BuiltinEditorDocumentParser::addFileAndDependencies(QSet *toRemove, + const QString &fileName) const { toRemove->insert(fileName); if (fileName != filePath()) { diff --git a/src/plugins/cpptools/cppsnapshotupdater.h b/src/plugins/cpptools/builtineditordocumentparser.h similarity index 90% rename from src/plugins/cpptools/cppsnapshotupdater.h rename to src/plugins/cpptools/builtineditordocumentparser.h index 1b360c34708..0e01c5f5eda 100644 --- a/src/plugins/cpptools/cppsnapshotupdater.h +++ b/src/plugins/cpptools/builtineditordocumentparser.h @@ -27,8 +27,8 @@ ** ****************************************************************************/ -#ifndef CPPTOOLS_INTERNAL_SNAPSHOTUPDATER_H -#define CPPTOOLS_INTERNAL_SNAPSHOTUPDATER_H +#ifndef BUILTINEDITORDOCUMENTPARSER_H +#define BUILTINEDITORDOCUMENTPARSER_H #include "baseeditordocumentparser.h" #include "cpptools_global.h" @@ -43,10 +43,10 @@ namespace CppTools { -class CPPTOOLS_EXPORT SnapshotUpdater : public BaseEditorDocumentParser +class CPPTOOLS_EXPORT BuiltinEditorDocumentParser : public BaseEditorDocumentParser { public: - SnapshotUpdater(const QString &filePath); + BuiltinEditorDocumentParser(const QString &filePath); void update(WorkingCopy workingCopy) QTC_OVERRIDE; void releaseResources(); @@ -75,4 +75,4 @@ private: } // namespace CppTools -#endif // CPPTOOLS_INTERNAL_SNAPSHOTUPDATER_H +#endif // BUILTINEDITORDOCUMENTPARSER_H diff --git a/src/plugins/cpptools/builtinindexingsupport.cpp b/src/plugins/cpptools/builtinindexingsupport.cpp index b16e85864e3..b89baebb1a8 100644 --- a/src/plugins/cpptools/builtinindexingsupport.cpp +++ b/src/plugins/cpptools/builtinindexingsupport.cpp @@ -1,9 +1,9 @@ #include "builtinindexingsupport.h" +#include "builtineditordocumentparser.h" #include "cppchecksymbols.h" #include "cppmodelmanager.h" #include "cppprojectfile.h" -#include "cppsnapshotupdater.h" #include "cppsourceprocessor.h" #include "cpptoolsconstants.h" #include "cpptoolsplugin.h" @@ -136,17 +136,17 @@ void indexFindErrors(QFutureInterface &future, const ParseParams params) qDebug("FindErrorsIndexing: \"%s\"", qPrintable(file)); // Parse the file as precisely as possible - SnapshotUpdater updater(file); - updater.setReleaseSourceAndAST(false); - updater.update(params.workingCopy); - CPlusPlus::Document::Ptr document = updater.document(); + BuiltinEditorDocumentParser parser(file); + parser.setReleaseSourceAndAST(false); + parser.update(params.workingCopy); + CPlusPlus::Document::Ptr document = parser.document(); QTC_ASSERT(document, return); // Write diagnostic messages taskFileWriter.process(document); // Look up symbols - CPlusPlus::LookupContext context(document, updater.snapshot()); + CPlusPlus::LookupContext context(document, parser.snapshot()); CheckSymbols::go(document, context, QList()).waitForFinished(); document->releaseSourceAndAST(); diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp index ab4f0078fcf..2ca9b0d956a 100644 --- a/src/plugins/cpptools/cppcompletionassist.cpp +++ b/src/plugins/cpptools/cppcompletionassist.cpp @@ -29,10 +29,10 @@ #include "cppcompletionassist.h" +#include "builtineditordocumentparser.h" #include "cppdoxygen.h" #include "cppmodelmanager.h" #include "cppmodelmanagerinterface.h" -#include "cppsnapshotupdater.h" #include "cpptoolsconstants.h" #include "cpptoolseditorsupport.h" #include "cpptoolsreuse.h" @@ -1959,10 +1959,10 @@ void CppCompletionAssistInterface::getCppSpecifics() const CppModelManagerInterface *modelManager = CppModelManagerInterface::instance(); if (CppEditorSupport *supp = modelManager->cppEditorSupport(m_editor)) { - if (QSharedPointer updater = supp->snapshotUpdater()) { - updater->update(m_workingCopy); - m_snapshot = updater->snapshot(); - m_headerPaths = updater->headerPaths(); + if (QSharedPointer parser = supp->documentParser()) { + parser->update(m_workingCopy); + m_snapshot = parser->snapshot(); + m_headerPaths = parser->headerPaths(); } } } diff --git a/src/plugins/cpptools/cppmodelmanager_test.cpp b/src/plugins/cpptools/cppmodelmanager_test.cpp index b8fbe7b926c..b443f5ba5a2 100644 --- a/src/plugins/cpptools/cppmodelmanager_test.cpp +++ b/src/plugins/cpptools/cppmodelmanager_test.cpp @@ -947,16 +947,15 @@ void CppToolsPlugin::test_modelmanager_precompiled_headers() while (sup->lastSemanticInfoDocument().isNull()) QCoreApplication::processEvents(); - const QSharedPointer updater = sup->snapshotUpdater(); - updater->setUsePrecompiledHeaders(true); - updater->update(mm->workingCopy()); + sup->documentParser()->setUsePrecompiledHeaders(true); + sup->documentParser()->update(mm->workingCopy()); // Check if defines from pch are considered Document::Ptr document = mm->document(fileName); QCOMPARE(nameOfFirstDeclaration(document), firstDeclarationName); // Check if declarations from pch are considered - CPlusPlus::LookupContext context(document, updater->snapshot()); + CPlusPlus::LookupContext context(document, sup->documentParser()->snapshot()); const CPlusPlus::Identifier *identifier = document->control()->identifier(firstClassInPchFile.data()); const QList results = context.lookup(identifier, @@ -1031,8 +1030,8 @@ void CppToolsPlugin::test_modelmanager_defines_per_editor() while (sup->lastSemanticInfoDocument().isNull()) QCoreApplication::processEvents(); - sup->snapshotUpdater()->setEditorDefines(editorDefines.toUtf8()); - sup->snapshotUpdater()->update(mm->workingCopy()); + sup->documentParser()->setEditorDefines(editorDefines.toUtf8()); + sup->documentParser()->update(mm->workingCopy()); Document::Ptr doc = mm->document(main1File); QCOMPARE(nameOfFirstDeclaration(doc), firstDeclarationName); diff --git a/src/plugins/cpptools/cppsourceprocessor_test.cpp b/src/plugins/cpptools/cppsourceprocessor_test.cpp index db7983cbf31..0a3a09fe0a1 100644 --- a/src/plugins/cpptools/cppsourceprocessor_test.cpp +++ b/src/plugins/cpptools/cppsourceprocessor_test.cpp @@ -29,10 +29,10 @@ #include "cpptoolsplugin.h" +#include "builtineditordocumentparser.h" #include "cppmodelmanager.h" #include "cppsourceprocessertesthelper.h" #include "cppsourceprocessor.h" -#include "cppsnapshotupdater.h" #include "cpptoolseditorsupport.h" #include "cpptoolstestcase.h" @@ -131,7 +131,7 @@ void CppToolsPlugin::test_cppsourceprocessor_includes_cyclic() const QString fileName2 = TestIncludePaths::testFilePath(QLatin1String("cyclic2.h")); const QStringList sourceFiles = QStringList() << fileName1 << fileName2; - // Create global snapshot (needed in SnapshotUpdater) + // Create global snapshot (needed in BuiltinEditorDocumentParser) TestCase testCase; testCase.parseFiles(sourceFiles); @@ -144,9 +144,10 @@ void CppToolsPlugin::test_cppsourceprocessor_includes_cyclic() CppEditorSupport *cppEditorSupport = CppModelManagerInterface::instance() ->cppEditorSupport(editor); QVERIFY(cppEditorSupport); - QSharedPointer snapshotUpdater = cppEditorSupport->snapshotUpdater(); - QVERIFY(snapshotUpdater); - Snapshot snapshot = snapshotUpdater->snapshot(); + QSharedPointer documentParser + = cppEditorSupport->documentParser(); + QVERIFY(documentParser); + Snapshot snapshot = documentParser->snapshot(); QCOMPARE(snapshot.size(), 3); // Configuration file included // Check includes diff --git a/src/plugins/cpptools/cpptools.pro b/src/plugins/cpptools/cpptools.pro index b5be6344851..a0e45d60008 100644 --- a/src/plugins/cpptools/cpptools.pro +++ b/src/plugins/cpptools/cpptools.pro @@ -5,6 +5,7 @@ include(../../qtcreatorplugin.pri) HEADERS += \ abstracteditorsupport.h \ baseeditordocumentparser.h \ + builtineditordocumentparser.h \ builtinindexingsupport.h \ commentssettings.h \ completionsettingspage.h \ @@ -41,7 +42,6 @@ HEADERS += \ cppqtstyleindenter.h \ cpprefactoringchanges.h \ cppsemanticinfo.h \ - cppsnapshotupdater.h \ cppsourceprocessor.h \ cpptools_global.h \ cpptoolsconstants.h \ @@ -64,6 +64,7 @@ HEADERS += \ SOURCES += \ abstracteditorsupport.cpp \ baseeditordocumentparser.cpp \ + builtineditordocumentparser.cpp \ builtinindexingsupport.cpp \ commentssettings.cpp \ completionsettingspage.cpp \ @@ -100,7 +101,6 @@ SOURCES += \ cppqtstyleindenter.cpp \ cpprefactoringchanges.cpp \ cppsemanticinfo.cpp \ - cppsnapshotupdater.cpp \ cppsourceprocessor.cpp \ cpptoolseditorsupport.cpp \ cpptoolsplugin.cpp \ diff --git a/src/plugins/cpptools/cpptools.qbs b/src/plugins/cpptools/cpptools.qbs index 081160dd7a2..1c47b7ab608 100644 --- a/src/plugins/cpptools/cpptools.qbs +++ b/src/plugins/cpptools/cpptools.qbs @@ -25,6 +25,7 @@ QtcPlugin { files: [ "abstracteditorsupport.cpp", "abstracteditorsupport.h", "baseeditordocumentparser.cpp", "baseeditordocumentparser.h", + "builtineditordocumentparser.cpp", "builtineditordocumentparser.h", "builtinindexingsupport.cpp", "builtinindexingsupport.h", "commentssettings.cpp", "commentssettings.h", "completionsettingspage.cpp", "completionsettingspage.h", "completionsettingspage.ui", @@ -61,7 +62,6 @@ QtcPlugin { "cppqtstyleindenter.cpp", "cppqtstyleindenter.h", "cpprefactoringchanges.cpp", "cpprefactoringchanges.h", "cppsemanticinfo.cpp", "cppsemanticinfo.h", - "cppsnapshotupdater.cpp", "cppsnapshotupdater.h", "cppsourceprocessor.cpp", "cppsourceprocessor.h", "cpptools.qrc", "cpptools_global.h", diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index 9ebc61e955e..2342a5b695d 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -171,11 +171,11 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor CppEditorSupport::~CppEditorSupport() { - m_documentParser.cancel(); + m_documentParserFuture.cancel(); m_highlighter.cancel(); m_futureSemanticInfo.cancel(); - m_documentParser.waitForFinished(); + m_documentParserFuture.waitForFinished(); m_highlighter.waitForFinished(); m_futureSemanticInfo.waitForFinished(); } @@ -259,12 +259,12 @@ CppCompletionAssistProvider *CppEditorSupport::completionAssistProvider() const return m_completionAssistProvider; } -QSharedPointer CppEditorSupport::snapshotUpdater() +QSharedPointer CppEditorSupport::documentParser() { - QSharedPointer updater = snapshotUpdater_internal(); + QSharedPointer updater = documentParser_internal(); if (!updater || updater->filePath() != fileName()) { - updater = QSharedPointer(new SnapshotUpdater(fileName())); - setSnapshotUpdater_internal(updater); + updater = QSharedPointer(new BuiltinEditorDocumentParser(fileName())); + setDocumentParser_internal(updater); QSharedPointer cms = CppToolsPlugin::instance()->codeModelSettings(); updater->setUsePrecompiledHeaders(cms->pchUsage() != CppCodeModelSettings::PchUse_None); @@ -282,7 +282,7 @@ void CppEditorSupport::updateDocument() m_updateDocumentTimer->start(m_updateDocumentInterval); } -static void parse(QFutureInterface &future, QSharedPointer updater, +static void parse(QFutureInterface &future, QSharedPointer updater, WorkingCopy workingCopy) { future.setProgressRange(0, 1); @@ -300,7 +300,7 @@ static void parse(QFutureInterface &future, QSharedPointerstart(m_updateDocumentInterval); } else { m_updateDocumentTimer->stop(); @@ -311,14 +311,14 @@ void CppEditorSupport::updateDocumentNow() if (m_highlightingSupport && !m_highlightingSupport->requiresSemanticInfo()) startHighlighting(); - m_documentParser = QtConcurrent::run(&parse, snapshotUpdater(), + m_documentParserFuture = QtConcurrent::run(&parse, documentParser(), CppModelManager::instance()->workingCopy()); } } bool CppEditorSupport::isUpdatingDocument() { - return m_updateDocumentTimer->isActive() || m_documentParser.isRunning(); + return m_updateDocumentTimer->isActive() || m_documentParserFuture.isRunning(); } void CppEditorSupport::onDocumentUpdated(Document::Ptr doc) @@ -488,7 +488,7 @@ void CppEditorSupport::releaseResources() { m_highlighter.cancel(); m_highlighter = QFuture(); - snapshotUpdater()->releaseResources(); + documentParser()->releaseResources(); setSemanticInfo(SemanticInfo(), /*emitSignal=*/ false); m_lastHighlightOnCompleteSemanticInfo = true; } @@ -524,11 +524,12 @@ SemanticInfo CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::So // Otherwise reprocess document } else { - const QSharedPointer snapshotUpdater = snapshotUpdater_internal(); - QTC_ASSERT(snapshotUpdater, return newSemanticInfo); - newSemanticInfo.snapshot = snapshotUpdater->snapshot(); + const QSharedPointer documentParser + = documentParser_internal(); + QTC_ASSERT(documentParser, return newSemanticInfo); + newSemanticInfo.snapshot = documentParser->snapshot(); if (!newSemanticInfo.snapshot.contains(source.fileName)) - return newSemanticInfo; // SnapshotUpdater::update() not yet started. + return newSemanticInfo; // BuiltinEditorDocumentParser::update() not yet started. Document::Ptr doc = newSemanticInfo.snapshot.preprocessedDocument(source.code, source.fileName); if (processor) @@ -583,16 +584,17 @@ void CppEditorSupport::setSemanticInfo(const SemanticInfo &semanticInfo, bool em emit semanticInfoUpdated(semanticInfo); } -QSharedPointer CppEditorSupport::snapshotUpdater_internal() const +QSharedPointer CppEditorSupport::documentParser_internal() const { - QMutexLocker locker(&m_snapshotUpdaterLock); - return m_snapshotUpdater; + QMutexLocker locker(&m_documentParserLock); + return m_documentParser; } -void CppEditorSupport::setSnapshotUpdater_internal(const QSharedPointer &updater) +void CppEditorSupport::setDocumentParser_internal( + const QSharedPointer &updater) { - QMutexLocker locker(&m_snapshotUpdaterLock); - m_snapshotUpdater = updater; + QMutexLocker locker(&m_documentParserLock); + m_documentParser = updater; } void CppEditorSupport::onMimeTypeChanged() diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h index f859d55b1ac..1a5ce7b5d99 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.h +++ b/src/plugins/cpptools/cpptoolseditorsupport.h @@ -30,10 +30,10 @@ #ifndef CPPTOOLSEDITORSUPPORT_H #define CPPTOOLSEDITORSUPPORT_H +#include "builtineditordocumentparser.h" #include "cpphighlightingsupport.h" #include "cppmodelmanager.h" #include "cppsemanticinfo.h" -#include "cppsnapshotupdater.h" #include #include @@ -133,7 +133,7 @@ public: CppCompletionAssistProvider *completionAssistProvider() const; - QSharedPointer snapshotUpdater(); + QSharedPointer documentParser(); /// Checks whether the document is (re)parsed or about to be (re)parsed. bool isUpdatingDocument(); @@ -202,8 +202,8 @@ private: SemanticInfo semanticInfo() const; void setSemanticInfo(const SemanticInfo &semanticInfo, bool emitSignal = true); - QSharedPointer snapshotUpdater_internal() const; - void setSnapshotUpdater_internal(const QSharedPointer &updater); + QSharedPointer documentParser_internal() const; + void setDocumentParser_internal(const QSharedPointer &updater); private: Internal::CppModelManager *m_modelManager; @@ -212,7 +212,6 @@ private: QTimer *m_updateDocumentTimer; int m_updateDocumentInterval; unsigned m_revision; - QFuture m_documentParser; QTimer *m_editorGCTimer; bool m_editorVisible; @@ -234,8 +233,9 @@ private: mutable QMutex m_lastSemanticInfoLock; SemanticInfo m_lastSemanticInfo; QFuture m_futureSemanticInfo; - mutable QMutex m_snapshotUpdaterLock; - QSharedPointer m_snapshotUpdater; + mutable QMutex m_documentParserLock; + QSharedPointer m_documentParser; + QFuture m_documentParserFuture; // Highlighting: unsigned m_lastHighlightRevision; diff --git a/src/plugins/designer/gotoslot_test.cpp b/src/plugins/designer/gotoslot_test.cpp index 804055f548b..4ce7517d152 100644 --- a/src/plugins/designer/gotoslot_test.cpp +++ b/src/plugins/designer/gotoslot_test.cpp @@ -195,10 +195,10 @@ public: // Compare const Document::Ptr cppDocument - = m_modelManager->cppEditorSupport(cppFileEditor)->snapshotUpdater()->document(); + = m_modelManager->cppEditorSupport(cppFileEditor)->documentParser()->document(); QVERIFY(checkDiagsnosticMessages(cppDocument)); const Document::Ptr hDocument - = m_modelManager->cppEditorSupport(hFileEditor)->snapshotUpdater()->document(); + = m_modelManager->cppEditorSupport(hFileEditor)->documentParser()->document(); QVERIFY(checkDiagsnosticMessages(hDocument)); QVERIFY(documentContainsFunctionDefinition(cppDocument,