qt5base-lts/tests/auto/widgets/itemviews
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
..
qabstractitemview Fix problems with extended selection after changing the model contents 2015-03-22 14:38:07 +00:00
qcolumnview Update copyright headers 2015-02-11 06:49:51 +00:00
qdatawidgetmapper Update copyright headers 2015-02-11 06:49:51 +00:00
qdirmodel Update copyright headers 2015-02-11 06:49:51 +00:00
qfileiconprovider Update copyright headers 2015-02-11 06:49:51 +00:00
qheaderview Update copyright headers 2015-02-11 06:49:51 +00:00
qitemdelegate Update copyright headers 2015-02-11 06:49:51 +00:00
qitemeditorfactory Update copyright headers 2015-02-11 06:49:51 +00:00
qitemview Update copyright headers 2015-02-11 06:49:51 +00:00
qlistview QtWidgets: assorted migrations to QString::asprintf 2015-02-12 19:39:49 +00:00
qlistwidget Update copyright headers 2015-02-11 06:49:51 +00:00
qtableview Fix problems with extended selection after changing the model contents 2015-03-22 14:38:07 +00:00
qtablewidget Update copyright headers 2015-02-11 06:49:51 +00:00
qtreeview Update copyright headers 2015-02-11 06:49:51 +00:00
qtreewidget QtWidgets: assorted migrations to QString::asprintf 2015-02-12 19:39:49 +00:00
qtreewidgetitemiterator Update copyright headers 2015-02-11 06:49:51 +00:00
itemviews.pro Move QStandardItem/QStandardItemModel to QtGui 2012-06-29 22:42:19 +02:00