aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-01-29 13:50:32 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-01-30 17:14:09 +0100
commit66af11c6cba24233aa0fad49bb2de965e3285ba1 (patch)
tree72e67674d3fb381b3c89d0543390c31e89c4005b /tools
parent7d2eecea4fd26d77dd0ac4f8e65f3073a07618ff (diff)
Avoid various inefficiencies
Coverity-Id: 435555 Coverity-Id: 435556 Coverity-Id: 435557 Coverity-Id: 435559 Coverity-Id: 435561 Coverity-Id: 435562 Coverity-Id: 435563 Coverity-Id: 435564 Coverity-Id: 435565 Coverity-Id: 435566 Coverity-Id: 435567 Coverity-Id: 435568 Coverity-Id: 435569 Change-Id: If482bde0189b72297f09e3ff28c825364d68fd89 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlformat/qmlformat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmlformat/qmlformat.cpp b/tools/qmlformat/qmlformat.cpp
index e6dd518cb6..adaccb8d4a 100644
--- a/tools/qmlformat/qmlformat.cpp
+++ b/tools/qmlformat/qmlformat.cpp
@@ -158,7 +158,7 @@ static bool parseFile(const QString &filename, const Options &options)
if (options.verbose)
qWarning().noquote() << "Dumping" << filename;
- const auto code = getFileItemOwner(fileItem)->code();
+ const auto &code = getFileItemOwner(fileItem)->code();
auto lwOptions = composeLwOptions(options, code);
WriteOutChecks checks = WriteOutCheck::Default;
//Disable writeOutChecks for some usecases