Description
Right now the next() function returns void. The issue lead to inefficient code, for example to iterate over all an object properties we have to write code like that below
QScriptValue object;
...
QScriptValueIterator it(object);
while (it.hasNext())
assuming that the next() function returns boolean value, it could be replaced:
QScriptValue object;
...
QScriptValueIterator it(object);
while (it.next())
That is one function call per iteration less.
According to QScriptValueIterator's documentation "The QScriptValueIterator class provides a Java-style iterator for QScriptValue." which is not true as the Java iterator returns an object reference or null on next() call. Another, Java like approach to the problem would be looking like that:
class QScriptProperty;
QScriptValue object;
...
QScriptValueIterator it(object);
while (QScriptProperty property = it.next())