diff options
author | hjk <hjk121@nokiamail.com> | 2014-09-10 17:07:32 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-09-11 07:37:35 +0200 |
commit | 47a36765df47ff4b77a760b5f67938d0568e9a8d (patch) | |
tree | 376f8c1ac601f160c996be0b5bb200d62cc9271e /src/plugins/texteditor/basetexteditor.cpp | |
parent | b1ab94301a732ad2f7a31be07aa37797101c72f5 (diff) |
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>
Diffstat (limited to 'src/plugins/texteditor/basetexteditor.cpp')
-rw-r--r-- | src/plugins/texteditor/basetexteditor.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 621cd81876..c90aeb6481 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -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); |