diff options
author | Ulf Hermann <[email protected]> | 2023-09-14 12:30:33 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2023-09-15 15:32:40 +0200 |
commit | 27dcc63e00a764b1abe49a4fdf7ee452f2f609f9 (patch) | |
tree | 0a77f0fe9e9b583e2ce52ef81c97f32ac8e8b648 /tools/qmlformat | |
parent | 8de468ed2a7fec573d2bfe0887816d2c8a2d07d4 (diff) |
QmlDom: Don't pass ErrorMessage by value
When iterating, pass it by const ref. When "adding" pass it by rvalue
ref. In the few places where that clashes, copy it explicitly.
Coverity-Id: 417092
Change-Id: I93b2d671c38a2f44334929fd7ec9c2f1a18caac8
Reviewed-by: Sami Shalayel <[email protected]>
Diffstat (limited to 'tools/qmlformat')
-rw-r--r-- | tools/qmlformat/qmlformat.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmlformat/qmlformat.cpp b/tools/qmlformat/qmlformat.cpp index 68dd7c5379..42c11670f8 100644 --- a/tools/qmlformat/qmlformat.cpp +++ b/tools/qmlformat/qmlformat.cpp @@ -65,7 +65,7 @@ bool parseFile(const QString &filename, const Options &options) std::shared_ptr<QmlFile> qmlFilePtr = qmlFile.ownerAs<QmlFile>(); if (!qmlFilePtr || !qmlFilePtr->isValid()) { qmlFile.iterateErrors( - [](DomItem, ErrorMessage msg) { + [](const DomItem &, const ErrorMessage &msg) { errorToQDebug(msg); return true; }, |