forked from qt-creator/qt-creator
TextEditor: Prevent overwriting of completion settings
This was a regression introduced during the editor setup refactoring. Task-number: QTCREATORBUG-12982 Change-Id: I7b26b4105dfb50357dd2cf97d07153031d0b2dc0 Reviewed-by: Campbell Barton <ideasman42@gmail.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -7282,14 +7282,16 @@ BaseTextEditor *BaseTextEditorFactory::createEditorHelper(const BaseTextDocument
|
||||
editor->d->m_origin = this;
|
||||
|
||||
editor->m_widget = widget;
|
||||
|
||||
// Needs to go before setTextDocument as this copies the current settings.
|
||||
if (m_autoCompleterCreator)
|
||||
widget->setAutoCompleter(m_autoCompleterCreator());
|
||||
|
||||
widget->setTextDocument(document);
|
||||
|
||||
widget->d->m_codeAssistant.configure(widget);
|
||||
widget->d->m_commentDefinition.setStyle(m_commentStyle);
|
||||
|
||||
if (m_autoCompleterCreator)
|
||||
widget->setAutoCompleter(m_autoCompleterCreator());
|
||||
|
||||
connect(widget, &BaseTextEditorWidget::markRequested, editor,
|
||||
[editor](int line, BaseTextEditor::MarkRequestKind kind) {
|
||||
editor->markRequested(editor, line, kind);
|
||||
|
||||
Reference in New Issue
Block a user