diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-11 21:48:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:13:36 +0200 |
commit | 6c9f1c8ed93374c16ca6ac540f39e98b451be0d8 (patch) | |
tree | 476d0046c6016a8cd62bfc29ed9697d98e98f738 /src/qml/qml/qqmlxmlhttprequest.cpp | |
parent | bdb27b96acbd38531879378c48959a5a1cd60963 (diff) |
Use a ReturnedValue for Managed::getIndexed()
Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp')
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 212f64fcef..85ae7fbe6c 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -205,7 +205,7 @@ public: that->as<NamedNodeMap>()->~NamedNodeMap(); } static ReturnedValue get(Managed *m, String *name, bool *hasProperty); - static Value getIndexed(Managed *m, uint index, bool *hasProperty); + static ReturnedValue getIndexed(Managed *m, uint index, bool *hasProperty); QList<NodeImpl *> list; // Only used in NamedNodeMap NodeImpl *d; @@ -236,7 +236,7 @@ public: that->as<NodeList>()->~NodeList(); } static ReturnedValue get(Managed *m, String *name, bool *hasProperty); - static Value getIndexed(Managed *m, uint index, bool *hasProperty); + static ReturnedValue getIndexed(Managed *m, uint index, bool *hasProperty); // C++ API static Value create(QV8Engine *, NodeImpl *); @@ -843,7 +843,7 @@ bool Node::isNull() const return d == 0; } -Value NamedNodeMap::getIndexed(Managed *m, uint index, bool *hasProperty) +ReturnedValue NamedNodeMap::getIndexed(Managed *m, uint index, bool *hasProperty) { QV4::ExecutionEngine *v4 = m->engine(); NamedNodeMap *r = m->as<NamedNodeMap>(); @@ -855,11 +855,11 @@ Value NamedNodeMap::getIndexed(Managed *m, uint index, bool *hasProperty) if ((int)index < r->list.count()) { if (hasProperty) *hasProperty = true; - return Node::create(engine, r->list.at(index)); + return Node::create(engine, r->list.at(index)).asReturnedValue(); } if (hasProperty) *hasProperty = false; - return Value::undefinedValue(); + return Value::undefinedValue().asReturnedValue(); } ReturnedValue NamedNodeMap::get(Managed *m, String *name, bool *hasProperty) @@ -897,7 +897,7 @@ Value NamedNodeMap::create(QV8Engine *engine, NodeImpl *data, const QList<NodeIm return Value::fromObject(instance); } -Value NodeList::getIndexed(Managed *m, uint index, bool *hasProperty) +ReturnedValue NodeList::getIndexed(Managed *m, uint index, bool *hasProperty) { QV4::ExecutionEngine *v4 = m->engine(); NodeList *r = m->as<NodeList>(); @@ -909,11 +909,11 @@ Value NodeList::getIndexed(Managed *m, uint index, bool *hasProperty) if ((int)index < r->d->children.count()) { if (hasProperty) *hasProperty = true; - return Node::create(engine, r->d->children.at(index)); + return Node::create(engine, r->d->children.at(index)).asReturnedValue(); } if (hasProperty) *hasProperty = false; - return Value::undefinedValue(); + return Value::undefinedValue().asReturnedValue(); } ReturnedValue NodeList::get(Managed *m, String *name, bool *hasProperty) |