aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmldom/qqmldomexternalitems_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-09-14 12:30:33 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-09-15 15:32:40 +0200
commit27dcc63e00a764b1abe49a4fdf7ee452f2f609f9 (patch)
tree0a77f0fe9e9b583e2ce52ef81c97f32ac8e8b648 /src/qmldom/qqmldomexternalitems_p.h
parent8de468ed2a7fec573d2bfe0887816d2c8a2d07d4 (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 <sami.shalayel@qt.io>
Diffstat (limited to 'src/qmldom/qqmldomexternalitems_p.h')
-rw-r--r--src/qmldom/qqmldomexternalitems_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmldom/qqmldomexternalitems_p.h b/src/qmldom/qqmldomexternalitems_p.h
index b217108c9f..e9da66f013 100644
--- a/src/qmldom/qqmldomexternalitems_p.h
+++ b/src/qmldom/qqmldomexternalitems_p.h
@@ -260,7 +260,7 @@ public:
{
return std::static_pointer_cast<QmlFile>(doCopy(self));
}
- void addError(const DomItem &self, ErrorMessage msg) override;
+ void addError(const DomItem &self, ErrorMessage &&msg) override;
const QMultiMap<QString, QmlComponent> &components() const & { return m_components; }
void setComponents(const QMultiMap<QString, QmlComponent> &components)