forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user