qt5base-lts/tests/auto/widgets/itemviews/qtreeview
Qiang Li f140ef04a0 Fix the crashes when animated QTreeWidgetItems are hidden
QTreeView's drawTree implementation performs lazy layouting
when calling itemDecorationAt. If animations are enabled,
this can change the list of items, and invalidate the copy
made earlier.

Don't copy the list of items, use a reference instead so that
code iterating over the items later operates on valid data.

Add an assert in the private itemHeight method, it must not
be called with an index that is out of bounds.

Fixes: QTBUG-42469
Pick-to: 6.0 6.1 5.15
Change-Id: Ifdb782881447912e00baffd1c407de10a1d8d0d4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-08 12:31:13 +00:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
BLACKLIST Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
tst_qtreeview.cpp Fix the crashes when animated QTreeWidgetItems are hidden 2021-03-08 12:31:13 +00:00