David Faure dcea42ea5d QTableView: fix dropping between items when precisely on the cell border
There's a one-pixel horizontal line between two cells where
indexAt(pos) returns a valid index and visualRect(index) doesn't contain
pos, because of the 1 pixel cell border.
So this code (whose origin predates public git history) would turn the
valid index into the root index, leading to an unexpected append instead
of insert.

The only other case I could find where this condition happened was when
dropping onto the branches of a QTreeView, but even there it seems much
more expected to drop on the item (or between items) than on the viewport
(which often means append at the very bottom, far from the drop area).

Change-Id: Ia7c884d3fc925a7536ea3ab75851366c531d8438
Fixes: QTBUG-130045
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit f9336a05bccaf8d287f949e3263e07f2e437835c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 16:14:31 +00:00
2024-02-29 15:35:57 +01:00
2015-08-18 19:59:14 +00:00
2024-07-12 01:42:29 +00:00
2024-09-19 07:20:47 +03:00
2024-02-02 15:23:02 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%