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/libs/cplusplus/CppDocument.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/libs/cplusplus/CppDocument.cpp')
-rw-r--r-- | src/libs/cplusplus/CppDocument.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp index 58301011b9..034e2f5585 100644 --- a/src/libs/cplusplus/CppDocument.cpp +++ b/src/libs/cplusplus/CppDocument.cpp @@ -825,6 +825,11 @@ void Snapshot::updateDependencyTable() const m_deps.build(*this); } +bool Snapshot::operator==(const Snapshot &other) const +{ + return _documents == other._documents; +} + void Snapshot::allIncludesForDocument_helper(const QString &fileName, QSet<QString> &result) const { if (Document::Ptr doc = document(fileName)) { |