qt5base-lts/tests/auto
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
..
bic/data Add binary compatibility files for Qt 6.0.0 2021-04-08 06:34:13 +00:00
cmake Use target_link_options to propagate object libraries 2021-07-02 15:17:06 +02:00
concurrent tst_QtConcurrentThreadEngine: fix the threadCount() test 2021-07-12 15:54:41 +02:00
corelib Consistent handling of disabled items in QItemSelectionModel 2021-07-15 18:09:12 +02:00
dbus Port QDBusServiceWatcher::watchedServices to bindable properties 2021-04-28 16:59:53 +02:00
gui Improve support for saving QImage to QSaveFile 2021-07-14 11:02:25 +00:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network QLocalSocket/Win: destroy the pipe before emitting final signals 2021-07-14 20:48:54 +03:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Fix crash in concurrent disconnect 2021-06-17 08:56:22 +02:00
printsupport Remove the qmake project files 2021-01-07 15:32:28 +01:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql QSqlTableModel::orderByClause(): Quote the table name 2021-05-03 14:10:36 +00:00
testlib QTest: fix -Wformat-overflow GCC warning 2021-07-01 06:44:30 +02:00
tools Test Q_CLASSINFO("foobar", #__VA_ARGS__) in tst_moc 2021-07-08 08:17:34 +02:00
widgets QMenu/QToolBar: remove addAction() functions 2021-07-13 19:58:08 +02:00
xml tst_qdom: clean-up the code enabled only before Qt 6 2021-01-15 15:22:08 +01:00
CMakeLists.txt CMake: Build minimal subset of tests in desktop static builds 2021-04-06 09:15:37 +01:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00