From 43035981c0a3ef28d1259333a55ee7cd0150402b Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 21 Aug 2014 18:09:06 +0200 Subject: [PATCH] TextEditor: Add a helper function to set up code assistance This is needed for further refactoring in the cpp and qmljs editors. Change-Id: Ic25525e5f468e915226e9daa8d118ff76a749e9f Reviewed-by: Christian Stenger --- src/plugins/texteditor/basetexteditor.cpp | 5 +++++ src/plugins/texteditor/basetexteditor.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index a39feff4c52..2015b131d25 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -6561,6 +6561,11 @@ void BaseTextEditor::setEditorWidget(BaseTextEditorWidget *widget) setWidget(widget); } +void BaseTextEditor::configureCodeAssistant() +{ + editorWidget()->d->m_codeAssistant.configure(this); +} + BaseTextEditor::~BaseTextEditor() { delete m_widget; diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index 58bd860fe6a..8ebaef29aa8 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -203,6 +203,8 @@ public: // FIXME: Only used to delay initialization from CppEditor. // There should be something simpler. void setCompletionAssistProvider(const std::function &provider); + // FIXME: Remove. + void configureCodeAssistant(); signals: void markRequested(TextEditor::BaseTextEditor *editor, int line, TextEditor::BaseTextEditor::MarkRequestKind kind);