aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-09-18 10:38:53 +0200
committerLars Knoll <lars.knoll@qt.io>2018-09-23 17:27:31 +0000
commitc7d097297d789dd7c32a77d8a038067db364734b (patch)
tree23b79aace557bb156b70d7ee8a53ff6c4b05dadd /src/qml/jsruntime/qv4object.cpp
parentbdf948b79db38ec02e89b64fd13b7146dd3f135c (diff)
Make Object::getOwnProperty() const
Object::getOwnProperty never modifies the object, so make it a const member function. Change-Id: I175bb45d61a66a1d9f577c087129562d44d62e17 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 7ea91c441d..29ccecf1f2 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -791,10 +791,10 @@ bool Object::virtualHasProperty(const Managed *m, PropertyKey id)
return false;
}
-PropertyAttributes Object::virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p)
+PropertyAttributes Object::virtualGetOwnProperty(const Managed *m, PropertyKey id, Property *p)
{
PropertyAttributes attrs;
- Object *o = static_cast<Object *>(m);
+ const Object *o = static_cast<const Object *>(m);
if (id.isArrayIndex()) {
uint index = id.asArrayIndex();
if (o->arrayData()) {