forked from qt-creator/qt-creator
Editor: move ownership of assist interface to processor
This way the base class can manage the lifetime of the interface object and it doesn't need to be done in each implementation of perform. Change-Id: Ie1ce742e31b688a337533ee6c57d376146e25ace Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -76,10 +76,10 @@ bool BindingEditorWidget::event(QEvent *event)
|
||||
return QmlJSEditor::QmlJSEditorWidget::event(event);
|
||||
}
|
||||
|
||||
TextEditor::AssistInterface *BindingEditorWidget::createAssistInterface(
|
||||
std::unique_ptr<TextEditor::AssistInterface> BindingEditorWidget::createAssistInterface(
|
||||
[[maybe_unused]] TextEditor::AssistKind assistKind, TextEditor::AssistReason assistReason) const
|
||||
{
|
||||
return new QmlJSEditor::QmlJSCompletionAssistInterface(
|
||||
return std::make_unique<QmlJSEditor::QmlJSCompletionAssistInterface>(
|
||||
textCursor(), Utils::FilePath(),
|
||||
assistReason, qmljsdocument->semanticInfo());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user