aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/baseeditordocumentprocessor.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-08-24 18:26:09 +0200
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-09-29 11:39:21 +0000
commita7928b4b0b4c283f50c485da305582aad73afcfc (patch)
treeb33c88442f551762c598a93acabfbbe97774cc35 /src/plugins/cpptools/baseeditordocumentprocessor.cpp
parentde6d7f06175be22820e7e767acf410ec1ed46fe9 (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/cpptools/baseeditordocumentprocessor.cpp')
-rw-r--r--src/plugins/cpptools/baseeditordocumentprocessor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/cpptools/baseeditordocumentprocessor.cpp b/src/plugins/cpptools/baseeditordocumentprocessor.cpp
index ec1a9a9617a..43f5fb9029d 100644
--- a/src/plugins/cpptools/baseeditordocumentprocessor.cpp
+++ b/src/plugins/cpptools/baseeditordocumentprocessor.cpp
@@ -64,6 +64,12 @@ TextEditor::TextDocument *BaseEditorDocumentProcessor::baseTextDocument() const
return m_baseTextDocument;
}
+TextEditor::QuickFixOperations
+BaseEditorDocumentProcessor::extraRefactoringOperations(const TextEditor::AssistInterface &)
+{
+ return TextEditor::QuickFixOperations();
+}
+
BaseEditorDocumentProcessor *BaseEditorDocumentProcessor::get(const QString &filePath)
{
CppModelManager *cmmi = CppModelManager::instance();