qt5base-lts/tests/auto/widgets/itemviews
Frank Reininghaus 5cc0d92c24 QAbstractItemView: use only a 1x1 QRect for selecting on mouse press
Before commit f1e9076809, mousePressEvent
called the virtual method setSelection(const QRect&, SelectionFlags)
with the 1x1 rectangle which contains only the clicked QPoint, unless
the SelectionFlag "Current" was set because Shift was pressed during
the mouse press.

Since that commit, the behavior has been changed such that the
rectangle is the one that is spanned by the center of the clicked item
and the clicked pixel. In theory, the result should be the same (i.e.,
only the clicked item should be selected), but

* the code path in QListView::setSelection for 1x1 QRects is more
  efficient, and
* using a larger QRect can cause problems with custom views, see the
  comments in QTBUG-18009

This commit ensures that the 1x1 QRect is used again, unless the
SelectionFlag "Current" is used.

Change-Id: I70dd70c083c20a3af6cd6095aa89a489756b505f
Task-number: QTBUG-18009
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2016-10-07 10:38:58 +00:00
..
qabstractitemview QAbstractItemView: use only a 1x1 QRect for selecting on mouse press 2016-10-07 10:38:58 +00:00
qcolumnview tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
qdatawidgetmapper Update copyright headers 2015-02-11 06:49:51 +00:00
qdirmodel fix usage of wince scope 2015-06-05 10:29:10 +00:00
qfileiconprovider QFileIconEngine: Remove reference to QFileIconProvider 2015-06-30 12:27:04 +00:00
qheaderview QHeaderView: fixing selection of reordered rows and columns 2016-04-21 21:13:38 +00:00
qitemdelegate Item delegates: show localized detailed tooltips and "What's this?" texts 2016-07-28 23:42:56 +00:00
qitemeditorfactory Update copyright headers 2015-02-11 06:49:51 +00:00
qitemview tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
qlistview QListView: fix skipping indexes in selectedIndexes(). 2016-02-17 04:53:16 +00:00
qlistwidget tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
qtableview QTableView: Fix selection for reordered or hidden rows/columns 2016-05-09 05:14:38 +00:00
qtablewidget Fix selected items after sorting in QTableWidget 2015-10-07 18:19:57 +00:00
qtreeview tst_QTreeView: Fix UB (invalid downcast, member call) 2016-08-01 16:07:50 +00:00
qtreewidget Tests: Harmonize code checking on platform name. 2015-09-24 07:49:30 +00:00
qtreewidgetitemiterator tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
itemviews.pro Move QStandardItem/QStandardItemModel to QtGui 2012-06-29 22:42:19 +02:00