qt5base-lts/tests/auto/widgets/itemviews
David Faure f6b36eaafe QHeaderView: fix visual/logical index corruption when restoring state
This is a followup to 77a8e90cdd which
didn't handle the case where no columns had been moved.
visualIndices and logicalIndices are empty until initializeIndexMapping()
is called, in which case appending is wrong.

As a result, visualIndex(i) would return -1 for the values over
those added by read(), and an assert would happen at painting time.

The fix is to leave visualIndices and logicalIndices empty if
they are empty already, leaving it to initializeIndexMapping()
to fill them later if necessary (e.g. when moving a column).

Task-number: QTBUG-60837
Change-Id: Ia7e4b9d3122647984acd434dfaa0400df319d065
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2017-05-26 12:43:31 +00:00
..
qabstractitemview Fix item keeping hover highlight even when mouse has left it 2017-03-13 15:47:10 +00:00
qcolumnview tests/auto/widgets: use QCOMPARE(., nullptr) 2016-11-30 07:24:47 +00:00
qdatawidgetmapper tests/auto/widgets: use QCOMPARE(., nullptr) 2016-11-30 07:24:47 +00:00
qdirmodel Fix tst_QDirModel for qemu 2017-04-07 05:53:47 +00:00
qfileiconprovider Updated license headers 2016-01-21 18:55:18 +00:00
qheaderview QHeaderView: fix visual/logical index corruption when restoring state 2017-05-26 12:43:31 +00:00
qitemdelegate Plug remaining memleaks in tests/auto/widgets/itemviews 2017-01-26 10:32:51 +00:00
qitemeditorfactory Updated license headers 2016-01-21 18:55:18 +00:00
qitemview QtWidgets: Remove Windows CE. 2016-04-07 10:24:45 +00:00
qlistview Plug remaining memleaks in tests/auto/widgets/itemviews 2017-01-26 10:32:51 +00:00
qlistwidget Plug remaining memleaks in tests/auto/widgets/itemviews 2017-01-26 10:32:51 +00:00
qtableview Merge remote-tracking branch 'origin/5.7' into dev 2016-05-23 21:09:46 +02:00
qtablewidget tests/auto/widgets: use QCOMPARE(., nullptr) 2016-11-30 07:24:47 +00:00
qtreeview Plug memleaks in tst_QTreeView 2017-01-26 10:32:35 +00:00
qtreewidget tst_QTreeWidget: plug memleaks 2017-01-26 10:32:30 +00:00
qtreewidgetitemiterator tests/auto/widgets: use QCOMPARE(., nullptr) 2016-11-30 07:24:47 +00:00
itemviews.pro Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00