diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-11-30 10:55:25 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-11-30 16:50:49 +0000 |
commit | a12a8c95f9d21fe1df5ce1a58d7d104838271bc6 (patch) | |
tree | 5e16e7864ece105001a34690cd8658186f1b2266 /src/plugins/clangcodemodel/clangeditordocumentprocessor.h | |
parent | 514a96c75fb63e91ba2080679d6aa05db02666cc (diff) |
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>
Diffstat (limited to 'src/plugins/clangcodemodel/clangeditordocumentprocessor.h')
-rw-r--r-- | src/plugins/clangcodemodel/clangeditordocumentprocessor.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h index cc696cc8e9..323f0f54a6 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h +++ b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h @@ -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; |