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/clangeditordocumentprocessor.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/clangeditordocumentprocessor.h')
-rw-r--r-- | src/plugins/clangcodemodel/clangeditordocumentprocessor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h index d887c59872..33035176ec 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h +++ b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h @@ -73,6 +73,9 @@ public: void updateCodeWarnings(const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics, uint documentRevision); + TextEditor::QuickFixOperations + extraRefactoringOperations(const TextEditor::AssistInterface &assistInterface) override; + public: static ClangEditorDocumentProcessor *get(const QString &filePath); |