qt5base-lts/tests/auto/corelib/itemmodels
Andreas Buhr 0c2125458a Consistent handling of disabled items in QItemSelectionModel
In QItemSelectionModel, items which are disabled or marked as not
selectable should not be considered as selected. But this was
not handled consistently.
The following methods considered only items which are enabled and
marked selectable: selectedIndexes(), rowIntersectsSelection(), and
columnIntersectsSelection(). The following methods considered only
items which are marked selectable, but did not check whether they
are enabled: selectedRows(), selectedColumns(), isRowSelected(),
isColumnSelected(), isSelected(). Finally there is hasSelection(),
which did not check for enabled nor for selectable.
This patch introduces consistent behavior. All methods check
both whether the items are enabled and whether they are selectable now.

[ChangeLog][QtCore][QItemSelectionModel][Important Behavior Changes]
All methods in QItemSelectionModel now consider only items which
are marked as enabled and selectable as part of the selection.

Fixes: QTBUG-93829
Pick-to: 6.2
Change-Id: I4725243ea6b0db4f289ce34ada22c7a9d3282713
Reviewed-by: David Faure <david.faure@kdab.com>
2021-07-15 18:09:12 +02:00
..
qabstractitemmodel Make sure QMimeData is fully declared 2021-01-11 16:57:41 +01:00
qabstractproxymodel QAbstractProxyModel: port to new property system 2021-05-04 22:58:59 +02:00
qconcatenatetablesproxymodel Fix get out of bounds index in QSortFilterProxyModel::filterAcceptsRow 2021-04-07 19:30:08 +08:00
qidentityproxymodel Remove the qmake project files 2021-01-07 15:32:28 +01:00
qitemmodel Remove the qmake project files 2021-01-07 15:32:28 +01:00
qitemselectionmodel Consistent handling of disabled items in QItemSelectionModel 2021-07-15 18:09:12 +02:00
qsortfilterproxymodel_common QSortFilterProxyModel: create mappings on demand again 2021-06-03 00:53:08 +02:00
qsortfilterproxymodel_recursive Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsortfilterproxymodel_regularexpression QSortFilterProxyModel: port to new property system 2021-05-11 21:05:09 +02:00
qstringlistmodel Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtransposeproxymodel Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Remove QRegExp support from QSortFilterProxyModel 2020-04-15 14:38:40 +02:00