forked from qt-creator/qt-creator
Editor: always configured assistant
A code assistant is not usable without a text editor widget and is always created as part of one, so make the dependency obvious by require it in the construction of the code assistant. This removes a bunch of functions and cheks. Change-Id: I96556430082ff729d99d2ae2516599f9b8cbc704 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -904,6 +904,7 @@ TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent)
|
||||
, m_requestMarkEnabled(true)
|
||||
, m_lineSeparatorsAllowed(false)
|
||||
, m_maybeFakeTooltipEvent(false)
|
||||
, m_codeAssistant(parent)
|
||||
, m_hoverHandlerRunner(parent, m_hoverHandlers)
|
||||
, m_clipboardAssistProvider(new ClipboardAssistProvider)
|
||||
, m_autoCompleter(new AutoCompleter)
|
||||
@@ -8876,7 +8877,6 @@ BaseTextEditor *TextEditorFactoryPrivate::createEditorHelper(const TextDocumentP
|
||||
textEditorWidget->autoCompleter()->setTabSettings(document->tabSettings());
|
||||
textEditorWidget->d->m_hoverHandlers = m_hoverHandlers;
|
||||
|
||||
textEditorWidget->d->m_codeAssistant.configure(textEditorWidget);
|
||||
textEditorWidget->d->m_commentDefinition = m_commentDefinition;
|
||||
|
||||
QObject::connect(textEditorWidget,
|
||||
|
||||
Reference in New Issue
Block a user