aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectiterator_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4objectiterator_p.h')
-rw-r--r--src/qml/jsruntime/qv4objectiterator_p.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h
index 6a8431913d..fa2b2b725f 100644
--- a/src/qml/jsruntime/qv4objectiterator_p.h
+++ b/src/qml/jsruntime/qv4objectiterator_p.h
@@ -84,8 +84,11 @@ struct Q_QML_EXPORT ObjectIterator
struct ForEachIteratorObject: Object {
struct Data : Object::Data {
- Data(Object *o, uint flags)
- : it(workArea, workArea + 1, o, flags) {}
+ Data(ExecutionContext *ctx, Object *o)
+ : Object::Data(ctx->engine())
+ , it(workArea, workArea + 1, o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) {
+ setVTable(staticVTable());
+ }
ObjectIterator it;
Value workArea[2];
};
@@ -98,12 +101,6 @@ struct ForEachIteratorObject: Object {
V4_OBJECT
Q_MANAGED_TYPE(ForeachIteratorObject)
- ForEachIteratorObject(ExecutionContext *ctx, Object *o)
- : Object(ctx->d()->engine)
- , __data(o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) {
- setVTable(staticVTable());
- }
-
ReturnedValue nextPropertyName() { return d()->it.nextPropertyNameAsString(); }
protected: