qt5base-lts/tests/auto/widgets
Frank Reininghaus f1e9076809 Fix problems with extended selection after changing the model contents
Storing the position of the first selected item in the view can lead to
wrong extended selections if the contents of the model change. Future
Shift-clicks will always use the previous position of the first selected
item, which may not be correct any more, to calculate the current
selection.

To fix this problem, a QPersistentModelIndex is used to keep track of
the first selected item.

A new unit test is added. Moreover, one function of the QTableView unit
test is changed such that it shows the view prior to performing the
test. Without this change, this test may fail. That the test, which
simulates mouse presses without showing the view, worked at all seems
to be a coincidence, as pointed out in QTBUG-18009.

Task-number: QTBUG-18009
Change-Id: I0d844fbd1a994c279a7c8ee5d9b5b9fccecd25bf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-22 14:38:07 +00:00
..
dialogs Fixed license headers 2015-02-17 18:46:09 +00:00
effects Update copyright headers 2015-02-11 06:49:51 +00:00
gestures Update copyright headers 2015-02-11 06:49:51 +00:00
graphicsview autotests: fix the build in case of QT_NO_WHEELEVENT 2015-03-03 13:30:39 +00:00
itemviews Fix problems with extended selection after changing the model contents 2015-03-22 14:38:07 +00:00
kernel Remove the tests for Ubuntu Oneiric (11.10) 2015-03-17 01:26:13 +00:00
styles Update copyright headers 2015-02-11 06:49:51 +00:00
util QtWidgets: assorted migrations to QString::asprintf 2015-02-12 19:39:49 +00:00
widgets QAbstractButton: emit released on focus out or disable 2015-03-10 11:35:32 +00:00
widgets.pro Add autotest for QGestureRecognizer. 2014-10-23 21:11:28 +02:00