aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r--src/qml/jsruntime/qv4string.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index 11d3100180..7342b27fb8 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -129,21 +129,21 @@ void String::destroy(Managed *that)
static_cast<String*>(that)->~String();
}
-Value String::get(Managed *m, String *name, bool *hasProperty)
+ReturnedValue String::get(Managed *m, String *name, bool *hasProperty)
{
String *that = static_cast<String *>(m);
ExecutionEngine *v4 = m->engine();
if (name == v4->id_length) {
if (hasProperty)
*hasProperty = true;
- return Value::fromInt32(that->_text.length());
+ return Value::fromInt32(that->_text.length()).asReturnedValue();
}
PropertyAttributes attrs;
Property *pd = v4->stringClass->prototype->__getPropertyDescriptor__(name, &attrs);
if (!pd || attrs.isGeneric()) {
if (hasProperty)
*hasProperty = false;
- return Value::undefinedValue();
+ return Value::undefinedValue().asReturnedValue();
}
if (hasProperty)
*hasProperty = true;
@@ -168,7 +168,7 @@ Value String::getIndexed(Managed *m, uint index, bool *hasProperty)
}
if (hasProperty)
*hasProperty = true;
- return engine->stringClass->prototype->getValue(Value::fromString(that), pd, attrs);
+ return Value::fromReturnedValue(engine->stringClass->prototype->getValue(Value::fromString(that), pd, attrs));
}
void String::put(Managed *m, String *name, const Value &value)