aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@qt.io>2017-02-15 10:18:51 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-02-16 18:54:01 +0000
commit87e74766d33bf364e42839d73e6b8b5e9cd39a07 (patch)
tree318b1ea647372d89ba9dba7365757b04a8a78e31 /src/quick/handlers
parentbc98a541c810e5cf162aa42fa3458c50673629b3 (diff)
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 <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/handlers')
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp1
1 files changed, 1 insertions, 0 deletions
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();