aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4arraydata.cpp
diff options
context:
space:
mode:
authorSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2025-08-21 18:30:41 +0200
committerSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2025-09-12 22:26:19 +0200
commit5a664f08367095b1af9198e3678663f4e7c1094a (patch)
treeccadcf65993049b5fa49f2acb205ac135852b76b /src/qml/jsruntime/qv4arraydata.cpp
parent24838eb716ac888eef06afc073aba9052b01bd3d (diff)
Release section item when the corresponding view item removed
The section item has not been removed or added to the section cache in all cases when the corresponding delegate item has been moved out of the visible area, either during flick or scroll. This happens in a case where the delegate item has been requested to be removed (as it goes out of the visible area) from the list view, but it's not released from the delegate model due to its caching mechanism. When an item is outside the visible area, releaseItem() is triggered, intended to free the item and its sections. The problem arises when releaseItem() calls QQmlInstanceModel::release(), which caches the item in the delegate model, but does not free the section. This prevents the section item from being released properly. This patch releases the section item whenever removeItem is triggered from the list view, which happens when the delegate item is moved out of the visible area. Fixes: QTBUG-137172 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ib7e78309e076e76750b03f3238a7501563a3962a Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4arraydata.cpp')
0 files changed, 0 insertions, 0 deletions