diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-08-01 17:30:05 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-08-01 21:54:46 +0000 |
commit | 388b2c5b46365a12aea5aaab091f24314349a102 (patch) | |
tree | 7a8a325d16c70d3e7060bc3e06176848e495ed2c /src/quick/items/qquickevents.cpp | |
parent | 70b05000e1ffd3942bd631520f2996209d0f8770 (diff) |
Keep pointer to touch point that is accessed twice
Change-Id: I460680e522ae8dd14b488ebba5e9608f9ce6ffe4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents.cpp')
-rw-r--r-- | src/quick/items/qquickevents.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index 966a78f56b..39dcf0ac1c 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -583,8 +583,9 @@ QQuickPointerEvent *QQuickPointerTouchEvent::reset(QEvent *event) { } for (int i = 0; i < newPointCount; ++i) { - m_touchPoints.at(i)->reset(tps.at(i), ev->timestamp()); - m_touchPoints.at(i)->setGrabber(grabbers.at(i)); + auto point = m_touchPoints.at(i); + point->reset(tps.at(i), ev->timestamp()); + point->setGrabber(grabbers.at(i)); } m_pointCount = newPointCount; return this; |