aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-08-31 12:20:11 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-02 17:31:23 +0000
commitf5962820d569865d943be57a633edb4c606831fd (patch)
tree9e589cf8ad5f82e4f22f061ed1addebc4c35a35b /src/quick
parent3e698f7c9f254af65bf986391c0e64d61a84d066 (diff)
Optimize QQuickMultiPointHandler::grabPoints slightly
Clazy reminded me about the usual const-ref optimization in a range for. Change-Id: I2eafb49d341758829ce8fc43a8e5432a2d6dd4f6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5b81451d448d667b500ae6283ded9e59826e72b3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/handlers/qquickmultipointhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/handlers/qquickmultipointhandler.cpp b/src/quick/handlers/qquickmultipointhandler.cpp
index 1e6f098f18..06063e2d1a 100644
--- a/src/quick/handlers/qquickmultipointhandler.cpp
+++ b/src/quick/handlers/qquickmultipointhandler.cpp
@@ -398,7 +398,7 @@ bool QQuickMultiPointHandler::grabPoints(QPointerEvent *event, const QVector<QEv
}
}
if (allowed) {
- for (auto point : points)
+ for (const auto &point : qAsConst(points))
setExclusiveGrab(event, point);
}
return allowed;