destructor code reverted

This commit is contained in:
Uwe Rathmann 2020-05-24 10:07:35 +02:00
parent 5fc7403ecc
commit d611e9cf57

View File

@ -208,11 +208,17 @@ QskWindow::~QskWindow()
// unefficient way, leading to lots of QQuickItem::ItemChildRemovedChange // unefficient way, leading to lots of QQuickItem::ItemChildRemovedChange
// depending operations. // depending operations.
Q_D( QskWindow ); QVector< QPointer< QQuickItem > > items;
auto contentItem = d->contentItem; const auto children = contentItem()->childItems();
d->contentItem = nullptr; for ( auto child : children )
delete contentItem; {
if ( child->parent() == contentItem() )
items += child;
}
for ( auto& item : qskAsConst( items ) )
delete item;
#endif #endif
} }