forked from qt-creator/qt-creator
TextEditor: get CompletionAssistProvider from editor.
And not from the global object pool. This way, the editors that have different highlighters for various language dialects, or editors that support multiple languages in a single editor, can decide themselves on what CompletionAssistProvider to provide. Change-Id: Ieebc4a8e7b3de6470fdb8103035aa3b8b2ba6598 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -500,6 +500,8 @@ BaseTextEditor *BaseTextEditorWidget::editor() const
|
||||
d->m_editor, SIGNAL(contentsChanged()));
|
||||
connect(this, SIGNAL(changed()),
|
||||
d->m_editor->document(), SIGNAL(changed()));
|
||||
connect(qobject_cast<BaseTextDocument *>(d->m_editor->document()),SIGNAL(mimeTypeChanged()),
|
||||
d->m_codeAssistant.data(), SLOT(reconfigure()));
|
||||
}
|
||||
return d->m_editor;
|
||||
}
|
||||
@@ -6311,6 +6313,11 @@ const CommentDefinition *BaseTextEditor::commentDefinition() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
CompletionAssistProvider *BaseTextEditor::completionAssistProvider()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BaseTextEditor::updateCursorPosition()
|
||||
{
|
||||
const QTextCursor cursor = m_editorWidget->textCursor();
|
||||
|
||||
Reference in New Issue
Block a user