f1e9076809
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> |
||
---|---|---|
.. | ||
qabstractitemview | ||
qcolumnview | ||
qdatawidgetmapper | ||
qdirmodel | ||
qfileiconprovider | ||
qheaderview | ||
qitemdelegate | ||
qitemeditorfactory | ||
qitemview | ||
qlistview | ||
qlistwidget | ||
qtableview | ||
qtablewidget | ||
qtreeview | ||
qtreewidget | ||
qtreewidgetitemiterator | ||
itemviews.pro |