forked from qt-creator/qt-creator
Clang: Request diagnostics/highlighting only if needed
Most of the time, the updated diagnostics/highlightings will be send by the backend on translation unit update. The other use case is changing the font settings (e.g. color), here we need to request the highlightings explicitly. Change-Id: I17a574eaf972c8bef12900241e7b33fe6ffd9dbd Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -83,12 +83,11 @@ public:
|
||||
TextEditor::QuickFixOperations
|
||||
extraRefactoringOperations(const TextEditor::AssistInterface &assistInterface) override;
|
||||
|
||||
ClangBackEnd::FileContainer fileContainer() const;
|
||||
ClangBackEnd::FileContainer fileContainerWithArguments() const;
|
||||
|
||||
void clearDiagnosticsWithFixIts();
|
||||
|
||||
public:
|
||||
enum class DocumentChangedCheck { NoCheck, RevisionCheck };
|
||||
static ClangEditorDocumentProcessor *get(const QString &filePath);
|
||||
|
||||
private slots:
|
||||
@@ -96,10 +95,11 @@ private slots:
|
||||
|
||||
private:
|
||||
void updateProjectPartAndTranslationUnitForEditor();
|
||||
void updateTranslationUnitForEditor(CppTools::ProjectPart *projectPart);
|
||||
void requestDiagnosticsAndHighlighting(CppTools::ProjectPart *projectPart);
|
||||
void requestDiagnosticsAndHighlighting(DocumentChangedCheck documentChangedCheck = DocumentChangedCheck::RevisionCheck);
|
||||
ClangBackEnd::FileContainer fileContainer(CppTools::ProjectPart *projectPart) const;
|
||||
void registerTranslationUnitForEditor(CppTools::ProjectPart *projectPart);
|
||||
void updateTranslationUnitIfProjectPartExists();
|
||||
void requestDocumentAnnotations(const QString &projectpartId);
|
||||
ClangBackEnd::FileContainer fileContainerWithArguments(CppTools::ProjectPart *projectPart) const;
|
||||
ClangBackEnd::FileContainer fileContainerWithDocumentContent(const QString &projectpartId) const;
|
||||
|
||||
private:
|
||||
ClangDiagnosticManager m_diagnosticManager;
|
||||
|
||||
Reference in New Issue
Block a user