aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectproto.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-01-08 13:08:41 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-20 21:13:48 +0100
commita7431e41128bd3aa272223746a5bb57597a87de3 (patch)
treee5308d5fed3474badba313179f2f1891df300bac /src/qml/jsruntime/qv4objectproto.cpp
parent50d6e51c73a37858699b90d64657cec5e0b53610 (diff)
Remove Property * return value from ObjectIterator
The added side effect is that the QJSValueIterator is now somewhat faster. Change-Id: I01ba9f2a72a34224f5691130df69a91ab75b72e6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 9474442a70..806da833ea 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -239,12 +239,13 @@ ReturnedValue ObjectPrototype::method_defineProperties(CallContext *ctx)
while (1) {
uint index;
PropertyAttributes attrs;
- Property *pd = it.next(name, &index, &attrs);
- if (!pd)
+ Property pd;
+ it.next(name, &index, &pd, &attrs);
+ if (attrs.isEmpty())
break;
Property n;
PropertyAttributes nattrs;
- val = o->getValue(pd, attrs);
+ val = o->getValue(&pd, attrs);
toPropertyDescriptor(ctx, val, &n, &nattrs);
if (scope.engine->hasException)
return Encode::undefined();