diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-05-07 13:33:24 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-07-22 13:49:12 +0200 |
commit | 33593f00e84e6fb05191e9bb88000566c0c96426 (patch) | |
tree | 127877f1719689659a8ec6cea669ad5d38ec0903 /src/qml/jsapi/qjsvalueiterator.cpp | |
parent | 9afc7d9a53ad86e548e2d239ff012bed15eb52ba (diff) |
Get rid of StringRef
Remove the Ref classes, as they won't be required
anymore once Managed and Managed::Data are separated.
Change-Id: Ic6bec2d5b4ecf2595ce129dbb45bbf6a385138a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsapi/qjsvalueiterator.cpp')
-rw-r--r-- | src/qml/jsapi/qjsvalueiterator.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/qml/jsapi/qjsvalueiterator.cpp b/src/qml/jsapi/qjsvalueiterator.cpp index 7e2ea5d104..449fb8235a 100644 --- a/src/qml/jsapi/qjsvalueiterator.cpp +++ b/src/qml/jsapi/qjsvalueiterator.cpp @@ -109,7 +109,9 @@ QJSValueIterator::QJSValueIterator(const QJSValue& object) QV4::Scope scope(v4); QV4::Scoped<QV4::ForEachIteratorObject> it(scope, d_ptr->iterator.value()); it->d()->it.flags = QV4::ObjectIterator::NoFlags; - it->d()->it.next(d_ptr->nextName, &d_ptr->nextIndex, &d_ptr->nextProperty, &d_ptr->nextAttributes); + QV4::String *nm = 0; + it->d()->it.next(nm, &d_ptr->nextIndex, &d_ptr->nextProperty, &d_ptr->nextAttributes); + d_ptr->nextName = nm; } /*! @@ -155,7 +157,9 @@ bool QJSValueIterator::next() return false; QV4::Scope scope(v4); QV4::Scoped<QV4::ForEachIteratorObject> it(scope, d_ptr->iterator.value()); - it->d()->it.next(d_ptr->nextName, &d_ptr->nextIndex, &d_ptr->nextProperty, &d_ptr->nextAttributes); + QV4::String *nm = 0; + it->d()->it.next(nm, &d_ptr->nextIndex, &d_ptr->nextProperty, &d_ptr->nextAttributes); + d_ptr->nextName = nm; return !!d_ptr->currentName || d_ptr->currentIndex != UINT_MAX; } @@ -230,7 +234,9 @@ QJSValueIterator& QJSValueIterator::operator=(QJSValue& object) d_ptr->iterator = v4->newForEachIteratorObject(v4->currentContext(), o)->asReturnedValue(); QV4::Scoped<QV4::ForEachIteratorObject> it(scope, d_ptr->iterator.value()); it->d()->it.flags = QV4::ObjectIterator::NoFlags; - it->d()->it.next(d_ptr->nextName, &d_ptr->nextIndex, &d_ptr->nextProperty, &d_ptr->nextAttributes); + QV4::String *nm = 0; + it->d()->it.next(nm, &d_ptr->nextIndex, &d_ptr->nextProperty, &d_ptr->nextAttributes); + d_ptr->nextName = nm; return *this; } |