aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectiterator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4objectiterator.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectiterator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4objectiterator.cpp b/src/qml/jsruntime/qv4objectiterator.cpp
index 8fdf281c7f..f03c2d6b86 100644
--- a/src/qml/jsruntime/qv4objectiterator.cpp
+++ b/src/qml/jsruntime/qv4objectiterator.cpp
@@ -92,38 +92,38 @@ Property *ObjectIterator::next(String **name, uint *index, PropertyAttributes *a
return 0;
}
-Value ObjectIterator::nextPropertyName(Value *value)
+ReturnedValue ObjectIterator::nextPropertyName(Value *value)
{
PropertyAttributes attrs;
uint index;
String *name;
Property *p = next(&name, &index, &attrs);
if (!p)
- return Value::nullValue();
+ return Encode::null();
if (value)
*value = Value::fromReturnedValue(object->getValue(p, attrs));
if (name)
- return Value::fromString(name);
+ return Value::fromString(name).asReturnedValue();
assert(index < UINT_MAX);
- return Value::fromDouble(index);
+ return Encode(index);
}
-Value ObjectIterator::nextPropertyNameAsString(Value *value)
+ReturnedValue ObjectIterator::nextPropertyNameAsString(Value *value)
{
PropertyAttributes attrs;
uint index;
String *name;
Property *p = next(&name, &index, &attrs);
if (!p)
- return Value::nullValue();
+ return Encode::null();
if (value)
*value = Value::fromReturnedValue(object->getValue(p, attrs));
if (name)
- return Value::fromString(name);
+ return Value::fromString(name).asReturnedValue();
assert(index < UINT_MAX);
- return Value::fromString(object->engine()->newString(QString::number(index)));
+ return Value::fromString(object->engine()->newString(QString::number(index))).asReturnedValue();
}