aboutsummaryrefslogtreecommitdiffstats
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 00:40:23 +0000
commit071e86cde5831f64c9c4746bce7519b4a3de04b1 (patch)
tree66b1a87c2658b80b7a30c3110774c7b48729f43d
parentfa94a35ee718e2a83440b66a6dd57e53a0aee500 (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>
-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 aaee15d2f0..ce3e60c058 100644
--- a/src/quick/handlers/qquickmultipointhandler.cpp
+++ b/src/quick/handlers/qquickmultipointhandler.cpp
@@ -362,7 +362,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;