diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-08-26 14:26:28 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-08-29 16:12:57 +0200 |
commit | 45570d406889bbf881e033feab163e149a5628cc (patch) | |
tree | 2c6a3844ef1e8eb08c05ff5b15ba5b2ca800feed /src/plugins/cpptools/builtineditordocumentprocessor.h | |
parent | 46b5ed2ba942847d91fdb347718d798dd5244524 (diff) | |
download | qt-creator-45570d406889bbf881e033feab163e149a5628cc.tar.gz |
CppTools: Provide the editor snapshot for SemanticInfoUpdater
...so that SemanticInfoUpdater does not depend anymore on the
EditorDocumentParser. Accessing the snapshot was a blocking operation
that delayed the semantic info update longer than actually needed.
Change-Id: I348d22ef83ab310d4319b2e8b9678fe90ee24d6a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cpptools/builtineditordocumentprocessor.h')
-rw-r--r-- | src/plugins/cpptools/builtineditordocumentprocessor.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/cpptools/builtineditordocumentprocessor.h b/src/plugins/cpptools/builtineditordocumentprocessor.h index 3319ad7d6e..8a242be918 100644 --- a/src/plugins/cpptools/builtineditordocumentprocessor.h +++ b/src/plugins/cpptools/builtineditordocumentprocessor.h @@ -61,7 +61,7 @@ public: static BuiltinEditorDocumentProcessor *get(const QString &filePath); private: - void onDocumentUpdated(CPlusPlus::Document::Ptr document); + void onParserFinished(CPlusPlus::Document::Ptr document, CPlusPlus::Snapshot snapshot); void onSemanticInfoUpdated(const CppTools::SemanticInfo semanticInfo); SemanticInfo::Source createSemanticInfoSource(bool force) const; @@ -70,6 +70,8 @@ private: QScopedPointer<BuiltinEditorDocumentParser> m_parser; QFuture<void> m_parserFuture; + CPlusPlus::Snapshot m_documentSnapshot; + SemanticInfoUpdater m_semanticInfoUpdater; QScopedPointer<SemanticHighlighter> m_semanticHighlighter; }; |