diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-07-26 21:27:00 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2016-07-26 19:55:55 +0000 |
commit | b3324d6285204661d16fd39483758b4076104d83 (patch) | |
tree | fe0e4a7c167b2d2359a1d6e6a68b3a127830b6b8 /src/quick | |
parent | 2aa10c778333908b3cbb5505e45b1d2fdb712529 (diff) |
Let clear grabbers remove grab from all points
There is no harm in clearing the cached points. Even though re-adding
points from the cache is also resetting the grab to nullptr.
Change-Id: Ia2e0b47199eaee0819bc6baba69bf0436dd2a768
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/qquickevents.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index c3e2219cf8..4a531b09ba 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -648,8 +648,8 @@ QVector<QQuickItem *> QQuickPointerTouchEvent::grabbers() const } void QQuickPointerTouchEvent::clearGrabbers() const { - for (int i = 0; i < pointCount(); ++i) - point(i)->setGrabber(nullptr); + for (auto point: m_touchPoints) + point->setGrabber(nullptr); } QVector<QPointF> QQuickPointerEvent::unacceptedPointScenePositions() const |