diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-12-06 13:31:40 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-12-11 07:58:05 +0000 |
commit | 92b17fd766205c18f692be4f58a31d76d57758ae (patch) | |
tree | a7248738c2165d5ae73a04d8606ed4888b6cdead /src/quick/handlers/qquicktaphandler.cpp | |
parent | 433c39f8a96d60d71598dc9f3ec9425b12de7d78 (diff) |
TapHandler: emit canceled when a gesturePolicy constrait is violated
If gesturePolicy is DragThreshold and the threshold is exceeded or
if gesturePolicy is withinBounds and you drag outside the bounds,
that means any pending tap gesture is canceled, so the canceled
signal should be emitted. It should not depend on a grab or an event
to be canceled. QQuickTapHandler::setPressed(press, cancel, point)
should take care of it when cancel is true.
Task-number: QTBUG-65003
Change-Id: I2018695f5fc4438e68df3b34cf258251dbd5f198
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquicktaphandler.cpp')
-rw-r--r-- | src/quick/handlers/qquicktaphandler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index e5b728db0f..8313b415bf 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -301,6 +301,8 @@ void QQuickTapHandler::setPressed(bool press, bool cancel, QQuickEventPoint *poi // on release, ungrab after emitting changed signals setExclusiveGrab(point, press); } + if (cancel) + emit canceled(point); } } |