qt5base-lts/tests/auto/widgets
ChunLin Wang ca69e5aeef Fix QListView assert when the last row is moved in IconMode
After the last row is moved, 0 will be returned when obtaining
row and column data. At this time, QListView::doitemslayout will
not call d->doitemslayout, so the QBspTree data structure will
not be cleaned up, leaving a stale tree structure behind. This
will trigger an assert during paintEvent handling if QListView is
set to IconMode

In QListView::ListMode the test for a valid model index doesn't
use an assert.

Call QListViewPrivate::clear explicitly if the column count is 0
so that the QBspTree and other data structures are cleared.

Add a test case that simulates this scenario by implementing a
model that returns a 0 column count for an index after the model
structure was changed through a move of rows.

Done-with: Volker Hilsheimer
Fixes: QTBUG-95463
Pick-to: 5.15 6.1 6.2
Change-Id: I36419be5459b8ced930c619f538482ea1db4ad03
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-09-01 16:03:15 +00:00
..
dialogs tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
effects Fix tst_qgraphicseffect on Wayland 2021-03-11 08:04:21 +01:00
graphicsview Revert "Forward touchEvents to children inside QGraphicsProxyWidget" 2021-08-30 19:34:50 +00:00
itemviews Fix QListView assert when the last row is moved in IconMode 2021-09-01 16:03:15 +00:00
kernel QWidget: cope with QObject::connect()'s incomplete SFINAE-friendliness 2021-07-24 00:33:09 +02:00
styles Implement missing support for 'em' and 'ex' lengths in style sheet 2021-08-10 19:43:02 +02:00
util Fix auto completion in QFileDialog on Windows 2021-07-09 00:48:44 +02:00
widgets Port to QImage and QPixmap deviceIndependentSize() 2021-09-01 15:24:05 +02:00
CMakeLists.txt Begin port of qtbase to CMake 2018-11-01 11:48:46 +00:00