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:
Nikolai Kosjar
2018-01-19 16:57:18 +01:00
parent 2c74441260
commit 5b1ae09fbf
5 changed files with 82 additions and 19 deletions

View File

@@ -40,7 +40,10 @@ class QMenu;
class QWidget;
QT_END_NAMESPACE
namespace Core { class IDocument; }
namespace Core {
class IDocument;
class Id;
} // namespace Core
namespace TextEditor { class TextEditorWidget; }
namespace CppTools {
class FollowSymbolInterface;
@@ -103,6 +106,8 @@ private:
void onProjectPartsUpdated(ProjectExplorer::Project *project);
void onProjectPartsRemoved(const QStringList &projectPartIds);
void onDiagnosticConfigsInvalidated(const QVector<Core::Id> &configIds);
void unregisterTranslationUnitsWithProjectParts(const QStringList &projectPartIds);
void connectTextDocumentToTranslationUnit(TextEditor::TextDocument *textDocument);