Use deleteLater instead of a direct delete
We are seeing a crash in QQuickWindowPrivate::polishItems because LVWPH is deleting items to polish from it's updatePolish
which means the set in QQuickWindowPrivate::polishItems may end up with some yet-to-process-but-now-deleted items. Switching
to deleteLater fixes this
commit62fd37c5d4ed0c8b4c18415ea3c50d6ff66ba665
authorAlbert Astals <albert.astals@canonical.com>
dateFri 25 Jul 2014, 11:02 (12 years ago)
parenta533a46
plugins/Dash/listviewwithpageheader.cpp+1−1
@@ -658,7 +658,7 @@ void ListViewWithPageHeader::reallyReleaseItem(ListItem *listItem)
658658 if (flags & QQmlDelegateModel::Destroyed) {
659659 item->setParentItem(nullptr);
660660 }
661− delete listItem->sectionItem();
661+ listItem->sectionItem()->deleteLater();
662662 delete listItem;
663663}
664664