Go to file
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
bin syncqt.pl: fix a few misguided regexes to match .h file names 2016-09-28 04:56:56 +00:00
config.tests libjpeg config test: init variable 2016-09-16 04:12:03 +00:00
dist add buildsystem changelog for 5.6.2 2016-09-25 06:42:29 +00:00
doc copy global qdoc config files in non-prefix shadow builds 2016-09-29 13:44:20 +00:00
examples Handle short reads in the local sockets example 2016-10-06 21:20:33 +00:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Skip chmod for separate_debug_info when cross compiling on Windows 2016-10-07 05:25:42 +00:00
qmake fix warning in qmakevfs without PROEVALUATOR_FULL 2016-09-29 13:44:51 +00:00
src QAbstractItemView: use only a 1x1 QRect for selecting on mouse press 2016-10-07 10:38:58 +00:00
tests QAbstractItemView: use only a 1x1 QRect for selecting on mouse press 2016-10-07 10:38:58 +00:00
tools configure.exe: Write MSVC compiler version to qconfig.pri 2016-09-03 20:13:50 +00:00
util Don't use QStringLiteral in comparisons 2016-01-28 18:00:47 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Update gitignore 2016-08-19 10:43:26 +00:00
.qmake.conf Bump version 2016-05-23 18:28:33 +00:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Pass no-pkg-config to qmake from config.test if appropriate 2016-08-25 12:09:13 +00:00
configure.bat Move the official Qt version from qglobal.h to .qmake.conf 2015-10-14 20:12:57 +00:00
header.BSD Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
header.COMM Add header template for commercial only modules 2015-10-19 10:37:18 +00:00
header.FDL Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPLv21 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.PREVIEW.COMMERCIAL Update copyright headers 2015-02-11 06:49:51 +00:00
qtbase.pro copy global qdoc config files in non-prefix shadow builds 2016-09-29 13:44:20 +00:00
sync.profile make a proper header-only module for QtZlib 2015-11-17 20:22:17 +00:00