diff options
author | Marco Bubke <marco.bubke@qt.io> | 2020-11-16 14:51:46 +0100 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2020-11-18 12:08:59 +0000 |
commit | 382aed1f72f1d573c02deb2cf5840bbc95904adb (patch) | |
tree | cbfbe73f3e072b75e0b440d856993226f75f0aa5 /src/plugins/qmldesigner/designercore/model/internalnode.cpp | |
parent | 2d5a6818f2aabc20c6a264cd4015fa22828ff621 (diff) | |
download | qt-creator-382aed1f72f1d573c02deb2cf5840bbc95904adb.tar.gz |
QmlDesigner: Improve return values
You can return by const reference if you the ownership of the return
value is non local. If it is local you should return by value. In that
case it should be non const because otherwise the compile cannot move
the return value.
Change-Id: I2a4b08dd0e67a2c2741a46bdd7def842c1db3fbf
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/designercore/model/internalnode.cpp')
-rw-r--r-- | src/plugins/qmldesigner/designercore/model/internalnode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/designercore/model/internalnode.cpp b/src/plugins/qmldesigner/designercore/model/internalnode.cpp index 1f8b622765..17b1d61eb2 100644 --- a/src/plugins/qmldesigner/designercore/model/internalnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/internalnode.cpp @@ -187,7 +187,7 @@ bool InternalNode::hasAuxiliaryData(const PropertyName &name) const return m_auxiliaryDataHash.contains(name); } -QHash<PropertyName, QVariant> InternalNode::auxiliaryData() const +const QHash<PropertyName, QVariant> &InternalNode::auxiliaryData() const { return m_auxiliaryDataHash; } |