From 87e74766d33bf364e42839d73e6b8b5e9cd39a07 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Wed, 15 Feb 2017 10:18:51 +0100 Subject: Notify timeHeld property changed whenever press state changes Otherwise, we might read the previous timeHeld value (when we released) in for instance the onPressed handler. Change-Id: I2678ad95fad9bd5062573b7ca6d2bff08ce29b87 Reviewed-by: Shawn Rutledge --- src/quick/handlers/qquicktaphandler.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quick/handlers/qquicktaphandler.cpp') diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index 5065e87e8e..228b6bbaf3 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -246,6 +246,7 @@ void QQuickTapHandler::setPressed(bool press, bool cancel, QQuickEventPoint *poi if (m_pressed != press) { m_pressed = press; connectPreRenderSignal(press); + updateTimeHeld(); if (press) { m_longPressTimer.start(longPressThresholdMilliseconds(), this); m_holdTimer.start(); -- cgit v1.2.3