diff options
Diffstat (limited to 'src/qml/jsapi/qjsvalueiterator.cpp')
-rw-r--r-- | src/qml/jsapi/qjsvalueiterator.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/qml/jsapi/qjsvalueiterator.cpp b/src/qml/jsapi/qjsvalueiterator.cpp index 9e02310815..6dcfafaa27 100644 --- a/src/qml/jsapi/qjsvalueiterator.cpp +++ b/src/qml/jsapi/qjsvalueiterator.cpp @@ -135,13 +135,10 @@ bool QJSValueIterator::hasNext() const /*! Advances the iterator by one position. - Returns true if there is at least one item ahead of the iterator - (i.e. the iterator is \e not at the back of the property sequence); + Returns true if there was at least one item ahead of the iterator + (i.e. the iterator was \e not already at the back of the property sequence); otherwise returns false. - Calling this function on an iterator located at the back of the - container leads to undefined results. - \sa hasNext(), name() */ bool QJSValueIterator::next() @@ -159,7 +156,7 @@ bool QJSValueIterator::next() QV4::Scope scope(v4); QV4::Scoped<QV4::ForEachIteratorObject> it(scope, d_ptr->iterator.value()); it->it.next(d_ptr->nextName, &d_ptr->nextIndex, &d_ptr->nextProperty, &d_ptr->nextAttributes); - return !!d_ptr->nextName || d_ptr->nextIndex != UINT_MAX; + return !!d_ptr->currentName || d_ptr->currentIndex != UINT_MAX; } /*! |