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> |
||
|---|---|---|
| .. | ||
| auto | ||
| baseline | ||
| benchmarks | ||
| global | ||
| libfuzzer | ||
| manual | ||
| shared | ||
| testserver | ||
| CMakeLists.txt | ||
| README | ||
README
This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.
Linux X11:
* The user must be logged in to an active desktop; you can't run the
autotests without a valid DISPLAY that allows X11 connections.
* The tests are run against a KDE3 or KDE4 desktop.
* Window manager uses "click to focus", and not "focus follows mouse". Many
tests move the mouse cursor around and expect this to not affect focus
and activation.
* Disable "click to activate", i.e., when a window is opened, the window
manager should automatically activate it (give it input focus) and not
wait for the user to click the window.