aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquicktaphandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/handlers/qquicktaphandler.cpp')
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index 255059b9bd..b88c028977 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -121,6 +121,11 @@ bool QQuickTapHandler::wantsEventPoint(QQuickEventPoint *point)
// (e.g. DragHandler) gets a chance to take over.
// Don't forget to emit released in case of a cancel.
bool ret = false;
+ bool overThreshold = dragOverThreshold(point);
+ if (overThreshold) {
+ m_longPressTimer.stop();
+ m_holdTimer.invalidate();
+ }
switch (point->state()) {
case QQuickEventPoint::Pressed:
case QQuickEventPoint::Released:
@@ -129,7 +134,7 @@ bool QQuickTapHandler::wantsEventPoint(QQuickEventPoint *point)
case QQuickEventPoint::Updated:
switch (m_gesturePolicy) {
case DragThreshold:
- ret = !dragOverThreshold(point);
+ ret = !overThreshold;
break;
case WithinBounds:
ret = parentContains(point);