qt5base-lts/tests/auto/widgets
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
..
dialogs tst_QFileSystemModel: Remove Win32LongFileName(). 2016-06-08 04:09:48 +00:00
effects Purge sRGB chunks from PNGs in tests. 2016-03-29 08:39:43 +00:00
gestures Autotest: Remove blacklistings 2016-04-01 05:41:21 +00:00
graphicsview tst_QGraphicsItem: Fix UB (invalid cast/member call) in prepareGeometryChange() 2016-09-22 15:25:18 +00:00
itemviews QAbstractItemView: use only a 1x1 QRect for selecting on mouse press 2016-10-07 10:38:58 +00:00
kernel tst_QShortcut: Fix UB (invalid cast) in shortcutDestroyed() 2016-10-05 17:47:09 +00:00
styles Plug remaining leaks in tests/auto/widgets/style 2016-09-30 10:45:34 +00:00
util Plug remaining leaks in tests/auto/widgets/util 2016-10-02 11:28:23 +00:00
widgets Plug memleak in tst_QStackedWidget 2016-10-05 17:45:49 +00:00
widgets.pro Add autotest for QGestureRecognizer. 2014-10-23 21:11:28 +02:00