diff options
-rw-r--r-- | src/quick/items/qquickitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 4c26708168..a9a5c4c4a2 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -9289,12 +9289,12 @@ void QQuickItemPrivate::localizedTouchEvent(const QTouchEvent *event, bool isFil bool hasAnotherGrabber = pointGrabber && pointGrabber != q; // if there's no exclusive grabber, look for passive grabbers during filtering if (isFiltering && !pointGrabber) { - auto pg = event->passiveGrabbers(p); + const auto pg = event->passiveGrabbers(p); if (!pg.isEmpty()) { // It seems unlikely to have multiple passive grabbers of one eventpoint with different grandparents. // So hopefully if we start from one passive grabber and go up the parent chain from there, // we will find any filtering parent items that exist. - auto handler = qmlobject_cast<QQuickPointerHandler *>(pg.first()); + auto handler = qmlobject_cast<QQuickPointerHandler *>(pg.constFirst()); if (handler) pointGrabber = handler->parentItem(); } |