aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents_p_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-08-26 16:39:22 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-09-19 07:44:05 +0000
commitb9a80c04b52a38ae2f24998e6b58a67bb20d8941 (patch)
tree4a4fa8cd7ccc7f22ff9fd004aade26b84add09c8 /src/quick/items/qquickevents_p_p.h
parentc364b935f06256ec7adfaf486ef35b3996152804 (diff)
QQuickEventPoint::invalidate(): set m_pointId to zero
One reason is that if event->pointById(someKnownId) returns true, a handler may assume that the point is still valid. So either pointById needs to check the valid flag, or we must reset the pointId so that it won't be found. Change-Id: I20e93f058737a77ed801f0148ab7525ab880902d Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickevents_p_p.h')
-rw-r--r--src/quick/items/qquickevents_p_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index 1c524e9e3b..132246f59b 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -276,7 +276,7 @@ public:
void reset(Qt::TouchPointState state, const QPointF &scenePos, quint64 pointId, ulong timestamp, const QVector2D &velocity = QVector2D());
void localize(QQuickItem *target);
- void invalidate() { m_valid = false; }
+ void invalidate();
QQuickPointerEvent *pointerEvent() const;
QPointF pos() const { return m_pos; }