aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-08-22 14:57:02 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-08-26 13:05:12 +0000
commitd0922fcd0ac6707a46cbfd8422aeee5e36a49202 (patch)
tree0342abb9eb7bea823d89e7a174b2cfb2d3baded3 /src/quick/items/qquickevents.cpp
parent31e757ad30f415a0e106b436388ed9a5aae1d177 (diff)
add QQuickEventPoint::scenePressPos property
It's important for some handlers to track the total movement so far. Change-Id: If729c48731725aa035c32d203d719ea80df83078 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickevents.cpp')
-rw-r--r--src/quick/items/qquickevents.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index e9d9631ed5..619ec455ff 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -521,8 +521,10 @@ void QQuickEventPoint::reset(Qt::TouchPointState state, const QPointF &scenePos,
m_accept = false;
m_state = static_cast<QQuickEventPoint::State>(state);
m_timestamp = timestamp;
- if (state == Qt::TouchPointPressed)
+ if (state == Qt::TouchPointPressed) {
m_pressTimestamp = timestamp;
+ m_scenePressPos = scenePos;
+ }
// TODO if Q_LIKELY(velocity.isNull) calculate velocity
m_velocity = velocity;
}