forked from qt-creator/qt-creator
TextEditor: Return BaseTextEditor for duplicate
Because the type is always a BaseTextEditor we can return a BaseTextEditor type. C++ is allowing to change the overload return type so long it is compatible. Change-Id: Ib4c88faaa6fdfb97fd03c51a120de0fa0c2d00cd Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -80,8 +80,7 @@ void TextEditorView::modelAttached(Model *model)
|
||||
AbstractView::modelAttached(model);
|
||||
|
||||
auto textEditor = Utils::UniqueObjectLatePtr<TextEditor::BaseTextEditor>(
|
||||
static_cast<TextEditor::BaseTextEditor *>(
|
||||
QmlDesignerPlugin::instance()->currentDesignDocument()->textEditor()->duplicate()));
|
||||
QmlDesignerPlugin::instance()->currentDesignDocument()->textEditor()->duplicate());
|
||||
|
||||
// Set the context of the text editor, but we add another special context to override shortcuts.
|
||||
Core::Context context = textEditor->context();
|
||||
|
||||
Reference in New Issue
Block a user