qtquick: Don't delete dock widgets in frame view dtor

views shouldn't delete controllers
This commit is contained in:
Sergio Martins
2022-06-06 13:44:53 +01:00
parent 5faf36700b
commit 0be61b0a1b
2 changed files with 5 additions and 13 deletions

View File

@@ -208,7 +208,6 @@ void DockWidgetModel::emitDataChangedFor(Controllers::DockWidget *dw)
void DockWidgetModel::remove(Controllers::DockWidget *dw)
{
qDebug() << Q_FUNC_INFO << dw->uniqueName();
QScopedValueRollback<bool> guard(m_removeGuard, true);
const int row = indexOf(dw);
if (row == -1) {
@@ -225,7 +224,6 @@ void DockWidgetModel::remove(Controllers::DockWidget *dw)
beginRemoveRows(QModelIndex(), row, row);
m_dockWidgets.removeOne(dw);
qDebug() << "Removed one from " << row;
endRemoveRows();
Q_EMIT countChanged();