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
// depending operations.
Q_D( QskWindow );
QVector< QPointer< QQuickItem > > items;
auto contentItem = d->contentItem;
d->contentItem = nullptr;
delete contentItem;
const auto children = contentItem()->childItems();
for ( auto child : children )
{
if ( child->parent() == contentItem() )
items += child;
}
for ( auto& item : qskAsConst( items ) )
delete item;
#endif
}