aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r--src/qml/jsruntime/qv4object_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 41484660ab..991c0591a5 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -185,12 +185,17 @@ struct Q_QML_EXPORT Object: Managed {
//
// helpers
//
- static ReturnedValue getValue(const Value &thisObject, const Value &v, PropertyAttributes attrs);
+ static ReturnedValue getValue(const Value &thisObject, const Value &v, PropertyAttributes attrs) {
+ if (attrs.isData())
+ return v.asReturnedValue();
+ return getValueAccessor(thisObject, v, attrs);
+ }
ReturnedValue getValue(const Value &v, PropertyAttributes attrs) const {
Scope scope(this->engine());
ScopedValue t(scope, const_cast<Object *>(this));
return getValue(t, v, attrs);
}
+ static ReturnedValue getValueAccessor(const Value &thisObject, const Value &v, PropertyAttributes attrs);
bool putValue(uint memberIndex, const Value &value);