aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquicktaphandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-11-07 17:48:27 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-12-13 21:38:51 +0000
commit12f89fb8dda86c61277e3814912013873b1657e6 (patch)
tree0e68ede778bd21bfa1e269c778014084d9387087 /src/quick/handlers/qquicktaphandler.cpp
parent358a72b6ecd0fef69edf5355f299af10225a6c8b (diff)
TapHandler: clean up when wantsEventPoint returns false
We already emitted grabCanceled() to inform QML callbacks, but we didn't call reset(). It seems more proper to do everything that would normally be done when grab is canceled. TapHandler should not give up its passive grab yet though, because that prevents delivery to any parent Flickable that might be filtering events. A parent Flickable should be able to start flicking after the drag threshold is exceeded (it happens to be exactly when TapHandler gives up). Fixes: QTBUG-71466 Fixes: QTBUG-71970 Change-Id: Ibba1b0de92cfd88547eeb44edb095d019de76a94 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/handlers/qquicktaphandler.cpp')
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index e97722d6b7..bae76ddd94 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -308,8 +308,12 @@ void QQuickTapHandler::setPressed(bool press, bool cancel, QQuickEventPoint *poi
// on release, ungrab after emitting changed signals
setExclusiveGrab(point, press);
}
- if (cancel)
+ if (cancel) {
emit canceled(point);
+ setExclusiveGrab(point, false);
+ reset();
+ emit pointChanged();
+ }
}
}