diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-02-14 16:25:18 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-02-19 10:10:27 +0000 |
commit | 32c82062f91cc77bbb2b502e50d72fa5978a281e (patch) | |
tree | 08fed8af074f85598ad9d868d26f40a73c5a7559 /src | |
parent | 688afce8579e623c618d7953cf0a42556441ebc9 (diff) |
Make ItemDeclaration::properties return an actual object
... rather than a const ref. We often call this function on temporary
values, in which case using the returned reference triggers undefined
behavior.
Change-Id: Iac9d6097c20438084640d9f8e425d2a59a9878ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/corelib/language/itemdeclaration.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/language/itemdeclaration.h b/src/lib/corelib/language/itemdeclaration.h index 936f8e5f7..f637e6bbb 100644 --- a/src/lib/corelib/language/itemdeclaration.h +++ b/src/lib/corelib/language/itemdeclaration.h @@ -59,7 +59,7 @@ public: typedef QList<PropertyDeclaration> Properties; void setProperties(const Properties &props) { m_properties = props; } - const Properties &properties() const { return m_properties; } + Properties properties() const { return m_properties; } void setDeprecationInfo(const DeprecationInfo &di) { m_deprecationInfo = di; } DeprecationInfo deprecationInfo() const { return m_deprecationInfo; } |