aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents.cpp
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.cpp
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.cpp')
-rw-r--r--src/quick/items/qquickevents.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index f4b203ac53..4bb591fae3 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -537,6 +537,12 @@ void QQuickEventPoint::localize(QQuickItem *target)
m_pos = QPointF();
}
+void QQuickEventPoint::invalidate()
+{
+ m_valid = false;
+ m_pointId = 0;
+}
+
QObject *QQuickEventPoint::grabber() const
{
return m_grabber.data();