diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-10-14 11:37:40 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-10-15 10:33:27 +0200 |
commit | 0c107b33d1578263d858f446458b60278267154f (patch) | |
tree | c8363d41695cc73278f2527a2b929fb9f1c90244 /src/plugins/cpptools/cppsemanticinfoupdater.cpp | |
parent | 756fba0dfbb4e5ad9fae07ba24d903cb986cec99 (diff) | |
download | qt-creator-0c107b33d1578263d858f446458b60278267154f.tar.gz |
CppTools: Do not re-use semantic document if dependencies changed
Changes from the current editor snapshot to the previous one represent
dependency changes (include paths, defines, ...) for the document. Use
this to stop the semantic info updater from re-using the previous
document for highlighthing.
Task-number: QTCREATORBUG-12267
Change-Id: I91308700122ded7c458c267b685c00b966874a64
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cppsemanticinfoupdater.cpp')
-rw-r--r-- | src/plugins/cpptools/cppsemanticinfoupdater.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppsemanticinfoupdater.cpp b/src/plugins/cpptools/cppsemanticinfoupdater.cpp index 6c1cda731e..f05f0d5d82 100644 --- a/src/plugins/cpptools/cppsemanticinfoupdater.cpp +++ b/src/plugins/cpptools/cppsemanticinfoupdater.cpp @@ -148,7 +148,8 @@ bool SemanticInfoUpdaterPrivate::reuseCurrentSemanticInfo(const SemanticInfo::So && currentSemanticInfo.doc && currentSemanticInfo.doc->translationUnit()->ast() && currentSemanticInfo.doc->fileName() == source.fileName - && !currentSemanticInfo.snapshot.isEmpty()) { + && !currentSemanticInfo.snapshot.isEmpty() + && currentSemanticInfo.snapshot == source.snapshot) { SemanticInfo newSemanticInfo; newSemanticInfo.revision = source.revision; newSemanticInfo.snapshot = source.snapshot; |