qt6-bb10/tests/auto
Kaloyan Chehlarski 5c94c5a4ef QAbstractItemView: Fix shift-select after changing index through model
When setting the current index through the related model's
QItemSelectionModel::setCurrentIndex(), the selection can also change.
However, attempting to shift-select after doing so would produce
an unexpected selection, because the internal variable that keeps
track of the start index of the current selection would still have
its old value.

This change moves where said variable is set: instead of doing that
in QAbstractItemView::setCurrentIndex(), it is now done inside the
currentChanged() slot instead. This slot will get called both when
the selection is modified through the QAbstractItemView class itself,
as well as when it's modified from the outside (e.g. from the model).

Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-127381
Change-Id: I6d38320e656aa5a102ce079604590672c88ecad1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fb2d64bc57aadf5bf140c72cf7eb2a5f391b7d55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-21 13:34:23 +00:00
..
bic/data Add binary compatibility file for 6.7.0 2024-04-17 10:18:37 +00:00
cmake CMake: qt_add_ui: Add sources to target_sources 2024-08-12 17:26:49 +00:00
concurrent tst_QtConcurrentThreadEngine: fix UB (uninitialized boolean) 2024-07-06 10:17:50 +00:00
corelib QByteArray: fix lastIndexOf for char values with set sign bit 2024-08-20 11:40:56 +00:00
dbus QDBusSignature: accept empty strings as valid 2024-05-10 13:17:20 -07:00
gui Respect QTextDocument::defaultFont() in ODF writer 2024-08-19 19:42:55 +00:00
guiapplauncher Convert "Color Editor Factory" Example to snippets 2024-04-19 13:39:41 +02:00
network QHttp2Connection test: silence conversion warning 2024-08-14 12:20:34 +00:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Fix accessibility of list views with underlying multi-column model 2024-06-26 22:52:30 +00:00
printsupport tests: blacklist tst_QPrinter::testPrintPreviewDialog() 2024-08-12 09:43:38 +00:00
shared Introduce flag to use typographical line metrics for fonts 2024-05-31 19:30:53 +02:00
sql SQL/QSqlRelationTableModel: don't crash with more than one relation 2024-07-22 21:00:12 +00:00
testlib tst_selftest: port away from qsnprintf() 2024-07-30 16:47:38 +00:00
tools moc: Print method index to JSON output 2024-08-20 08:51:01 +00:00
wasm Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
widgets QAbstractItemView: Fix shift-select after changing index through model 2024-08-21 13:34:23 +00:00
xml Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
CMakeLists.txt tst_QSettings: port to QTEST_THROW_ON_FAIL 2024-06-27 06:06:02 +00:00
network-settings.h Change license for tests files 2024-02-04 09:56:42 +01:00