qt5base-lts/tests/auto/gui/kernel/qtouchevent
Shawn Rutledge 0e5bbf3507 Make QEvent::setAccepted() virtual; set QEventPoints state the same
In Qt Quick, when we deliver an item-specific QTouchEvent that contains
only the subset of eventpoints that are inside the Item's bounds,
traditionally the Item can accept the event to tell the delivery logic
that the event is handled and doesn't need to be delivered further.
But an Item cannot be expected to have total scene awareness; so now,
the delivery is "done" only when all eventpoints in the original event
are accepted.  This behavior has been working well enough already due to
logic in QQuickWindow that iterates the points and accepts them if the
event is accepted; but it seems appropriate to move this enforcement
into QPointerEvent itself.  Making setAccepted() virtual gives us a
useful degree of freedom.

Event-handling code should alternatively use QEventPoint:setAccepted()
or QPointerEvent::setExclusiveGrabber() to take resonsibility for only
a subset of the touchpoints.

Another way to put it is that we treat QPointerEvent::setAccepted() as a
convenience method: accepting the QEventPoints is what counts (at least
in Qt Quick).

Change-Id: Icec42dc980f407bb5116f5c0852c051a4521105a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-22 04:54:17 +00:00
..
BLACKLIST unblacklist passing tests 2019-07-08 11:01:42 +00:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qtouchevent.pro Remove insignificant flag from qtouchevent.pro 2018-09-25 12:50:17 +00:00
tst_qtouchevent.cpp Make QEvent::setAccepted() virtual; set QEventPoints state the same 2020-10-22 04:54:17 +00:00