forked from qt-creator/qt-creator
QmlJsEditor: Fix crash on mode switch after save
Task-number: QDS-10709 Change-Id: I0eceef3815b6358d88329828d199d5918a273edf Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
f2343b417e
commit
949612c23e
@@ -145,10 +145,15 @@ void QmlJSOutlineWidget::setEditor(QmlJSEditorWidget *editor)
|
|||||||
|
|
||||||
connect(m_editor, &QmlJSEditorWidget::outlineModelIndexChanged,
|
connect(m_editor, &QmlJSEditorWidget::outlineModelIndexChanged,
|
||||||
this, &QmlJSOutlineWidget::updateSelectionInTree);
|
this, &QmlJSOutlineWidget::updateSelectionInTree);
|
||||||
connect(m_editor->qmlJsEditorDocument()->outlineModel(), &QmlOutlineModel::updated, this, [this] () {
|
connect(m_editor->qmlJsEditorDocument()->outlineModel(),
|
||||||
m_treeView->expandAll();
|
&QmlOutlineModel::updated,
|
||||||
m_editor->updateOutlineIndexNow();
|
this,
|
||||||
});
|
[treeView = QPointer(m_treeView), editor = QPointer(m_editor)]() {
|
||||||
|
if (treeView)
|
||||||
|
treeView->expandAll();
|
||||||
|
if (editor)
|
||||||
|
editor->updateOutlineIndexNow();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QAction*> QmlJSOutlineWidget::filterMenuActions() const
|
QList<QAction*> QmlJSOutlineWidget::filterMenuActions() const
|
||||||
|
Reference in New Issue
Block a user