diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-08-24 18:26:09 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-09-29 11:39:21 +0000 |
commit | a7928b4b0b4c283f50c485da305582aad73afcfc (patch) | |
tree | b33c88442f551762c598a93acabfbbe97774cc35 /src/plugins/clangcodemodel/clangdiagnosticfilter.h | |
parent | de6d7f06175be22820e7e767acf410ec1ed46fe9 (diff) |
Clang: Integrate clang's fixits as refactoring actions
They are invokable by the usual means (Alt+Enter, editor's context menu
> Refactor) plus by the context menu of the editor's left margin for the
related line.
The fixit text comes directly from libclang and is thus not translated.
We modify the text slighty by stripping the diagnostic category prefix
("note:", "error:", ...) and capitalizing the first letter.
A follow-up change should properly indicate available refactorings with
a refactoring icon in the editor's left margin.
Task-number: QTCREATORBUG-14868
Change-Id: I86157c9f824d2a9dedf19087476d02ad1e6cc854
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Diffstat (limited to 'src/plugins/clangcodemodel/clangdiagnosticfilter.h')
-rw-r--r-- | src/plugins/clangcodemodel/clangdiagnosticfilter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/clangcodemodel/clangdiagnosticfilter.h b/src/plugins/clangcodemodel/clangdiagnosticfilter.h index db62086d2fb..21b3befcfb7 100644 --- a/src/plugins/clangcodemodel/clangdiagnosticfilter.h +++ b/src/plugins/clangcodemodel/clangdiagnosticfilter.h @@ -47,15 +47,19 @@ public: QVector<ClangBackEnd::DiagnosticContainer> takeWarnings(); QVector<ClangBackEnd::DiagnosticContainer> takeErrors(); + QVector<ClangBackEnd::DiagnosticContainer> takeFixIts(); private: void filterDocumentRelatedWarnings(const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics); void filterDocumentRelatedErrors(const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics); + void filterFixits(); private: const QString &m_filePath; + QVector<ClangBackEnd::DiagnosticContainer> m_warningDiagnostics; QVector<ClangBackEnd::DiagnosticContainer> m_errorDiagnostics; + QVector<ClangBackEnd::DiagnosticContainer> m_fixItdiagnostics; }; } // namespace Internal |