aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/clangeditordocumentprocessor.h
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2018-01-19 16:57:18 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2018-01-29 08:14:08 +0000
commit5b1ae09fbf66ef318e3759b3862c749356ec7a4a (patch)
tree86e93b47865b2b425fc98a5e37e5880c23f75217 /src/plugins/clangcodemodel/clangeditordocumentprocessor.h
parent2c744412606ab3c0733948c3c2fec8e2da5f98b4 (diff)
Clang: Auto reparse if diagnostic config changes
On diagnostic config change, affected documents are closed behind the scenes. Visible ones are parsed immediately, invisible ones are tagged for parse once they become visible. Task-number: QTCREATORBUG-16263 Change-Id: Id4dcc69f1a4bfccc597e798d6821f8718f86e352 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel/clangeditordocumentprocessor.h')
-rw-r--r--src/plugins/clangcodemodel/clangeditordocumentprocessor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h
index 67ef0bc8a5..8715bbad08 100644
--- a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h
+++ b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h
@@ -28,6 +28,7 @@
#include "clangdiagnosticmanager.h"
#include "clangeditordocumentparser.h"
+#include <coreplugin/id.h>
#include <cpptools/builtineditordocumentprocessor.h>
#include <cpptools/semantichighlighter.h>
@@ -67,6 +68,8 @@ public:
CppTools::ProjectPart::Ptr projectPart() const;
void clearProjectPart();
+ Core::Id diagnosticConfigId() const;
+
void updateCodeWarnings(const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics,
const ClangBackEnd::DiagnosticContainer &firstHeaderErrorDiagnostic,
uint documentRevision);
@@ -120,6 +123,7 @@ private:
BackendCommunicator &m_communicator;
QSharedPointer<ClangEditorDocumentParser> m_parser;
CppTools::ProjectPart::Ptr m_projectPart;
+ Core::Id m_diagnosticConfigId;
bool m_isProjectFile = false;
QFutureWatcher<void> m_parserWatcher;
QTimer m_updateTranslationUnitTimer;