qtdeclarative/tests/auto/quick/qquicklistview
Santhosh Kumar 5a664f0836 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>
2025-09-12 22:26:19 +02:00
..
data Release section item when the corresponding view item removed 2025-09-12 22:26:19 +02:00
BLACKLIST Unblacklist tst_qquicklistview::populateTransitions on openSUSE 2025-05-08 06:35:58 +00:00
CMakeLists.txt Add Qt::Qml before Qt::QmlPrivate to auto tests 2024-10-22 01:27:15 +03:00
incrementalmodel.cpp Correct license for test files 2024-02-27 10:32:21 +01:00
incrementalmodel.h Correct license for test files 2024-02-27 10:32:21 +01:00
proxytestinnermodel.cpp Correct license for test files 2024-02-27 10:32:21 +01:00
proxytestinnermodel.h Correct license for test files 2024-02-27 10:32:21 +01:00
randomsortmodel.cpp Port away from QPair 2025-04-12 05:39:59 +00:00
randomsortmodel.h Port away from QPair 2025-04-12 05:39:59 +00:00
reusemodel.h Correct license for test files 2024-02-27 10:32:21 +01:00
tst_qquicklistview.cpp Release section item when the corresponding view item removed 2025-09-12 22:26:19 +02:00