diff options
| author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-12-15 16:14:22 +0200 |
|---|---|---|
| committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-12-15 16:14:22 +0200 |
| commit | b58ec3b086518da5aa573f99426235854c23e35f (patch) | |
| tree | 861a9935d8f1cdba2fdca546836a351736dbddbf /src/quick/items/qquickitemview.cpp | |
| parent | 4826f86e274f1b29bd769e6790824f9e62a40f62 (diff) | |
| parent | 22032227d16c39211e2ebceef97d21f4d89c7c87 (diff) | |
Merge tag 'v6.5.8-lts-lgpl' into 6.56.5
Qt 6.5.8-lts-lgpl release
Diffstat (limited to 'src/quick/items/qquickitemview.cpp')
| -rw-r--r-- | src/quick/items/qquickitemview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp index 210759585b..2da1f172f1 100644 --- a/src/quick/items/qquickitemview.cpp +++ b/src/quick/items/qquickitemview.cpp @@ -2497,7 +2497,9 @@ bool QQuickItemViewPrivate::releaseItem(FxViewItem *item, QQmlInstanceModel::Reu // One case where this can happen is moving an item out of one ObjectModel and into another. QQuickItemPrivate::get(item->item)->setCulled(true); } - if (!isClearing) + // If deleteLater was called, the item isn't long for this world and so we shouldn't store references to it. + // This can happen when a Repeater is used to populate items in SwipeView's ListView contentItem. + if (!isClearing && !QObjectPrivate::get(item->item)->deleteLaterCalled) unrequestedItems.insert(item->item, model->indexOf(item->item, q)); } else if (flags & QQmlInstanceModel::Destroyed) { item->item->setParentItem(nullptr); |
