qt6-bb10/tests/auto/widgets
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
..
dialogs Return button index for deprecated QMessageBox APIs 2024-06-06 10:37:23 +00:00
effects Change license for tests files 2024-02-04 09:56:42 +01:00
graphicsview tests: blacklist tst_QGraphicsItem::cursor() 2024-08-12 09:43:39 +00:00
itemviews QAbstractItemView: Fix shift-select after changing index through model 2024-08-21 13:34:23 +00:00
kernel Make QWidgetPrivate::setVisible virtual 2024-08-12 17:26:50 +00:00
styles QTBUG36933_brokenPseudoClassLookup() remove setActiveWindow() 2024-04-26 18:19:38 +02:00
util Use /tmp in tst_qcompleter on VxWorks 2024-06-12 15:53:35 +00:00
widgets tests: blacklist tst_QMenuBar::check_menuPosition() on U2404 2024-08-10 07:57:25 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00