qt5base-lts/tests/auto/corelib/itemmodels
Volker Hilsheimer dc126de22e QItemSelectionModel: don't warn when destroying the model
Amends 4f4a8e75ab, after which
QItemSelectionModel printed a warning when destroying the model.
We reset the selection model in response to the model getting destroyed,
and since the model is already set to be nullptr at this point the
select() function complains about changing the selection with no model
set being a no-op.

Fix this by not calling reset() when the model gets destroyed - the
stored selection and currentIndex are already reset at this point -
and instead only call reset() when a new model is set in initModel.

Fixes: QTBUG-117200
Pick-to: 6.6.0 6.6 6.5 6.2
Change-Id: I12fc6b3fb2f2ff2a34b46988d5f58151123f9976
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-09-22 01:42:45 +02:00
..
qabstractitemmodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qabstractproxymodel QAbstractProxyModel: fix binding loops 2023-09-03 18:20:33 +02:00
qconcatenatetablesproxymodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qidentityproxymodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qitemmodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qitemselectionmodel QItemSelectionModel: don't warn when destroying the model 2023-09-22 01:42:45 +02:00
qsortfilterproxymodel tst_QSortFilterProxyModel: fix mem-leaks II: sortStable() 2023-07-19 04:51:26 +00:00
qsortfilterproxymodel_recursive CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsortfilterproxymodel_regularexpression CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qstringlistmodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qtransposeproxymodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00