diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2020-06-13 23:04:31 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2020-06-14 20:10:01 +0000 |
commit | 625a35e492f4da458044368c5df6a21fdd2c9417 (patch) | |
tree | efdd27c6aeecc7fbfdfcd0a1f92f0489179fe9e0 /src/plugins/qmldesigner/qmlpreviewplugin | |
parent | e2670bf3e62d9a4a1aea5029b600fc292dfd1e5b (diff) |
QmlDesigner: performance-for-range-copy
Avoid copying the loop variable on each iteration if a const reference
would suffice.
For QPointers<>, this change only adds a const.
Change-Id: I5abe7d793cd46859a9a4f9304ec1bd41f899d72c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/qmlpreviewplugin')
-rw-r--r-- | src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp index 1fe99825c37..ff63f6522c5 100644 --- a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp +++ b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp @@ -144,7 +144,7 @@ void FpsLabelAction::fpsHandler(quint16 fpsValues[8]) fpsText = fpsText.arg("--"); else fpsText = fpsText.arg(lastValidFrames); - for (QPointer<QLabel> label : fpsHandlerLabelList) { + for (const QPointer<QLabel> label : fpsHandlerLabelList) { if (label) label->setText(fpsText); } |