From 0754f55287f4652382332bce42cd8c7d27846ef1 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 2 Aug 2018 15:44:12 +0200 Subject: Introduce a new mechanism to iterate over object properties The old advanceIterator schema was extremely ugly and in addition not flexible enough to support the requirements for Proxy.ownKeys and some of the methods in Object Implemented a new scheme through a OwnPropertyKeys method in the Object VTable that creates and returns an iterator object. Ported QJSValueIterator and for-in to use the new mechanism. There's still many places where we use the old ObjectIterator (that relies on advanceIterator). Those will be ported in subsequent commits. Change-Id: I091a9bea9ff6b2b63630cc336814700757a718be Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvaluetypewrapper_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qml/qml/qqmlvaluetypewrapper_p.h') diff --git a/src/qml/qml/qqmlvaluetypewrapper_p.h b/src/qml/qml/qqmlvaluetypewrapper_p.h index ff8ab98bb6..2df4dbb257 100644 --- a/src/qml/qml/qqmlvaluetypewrapper_p.h +++ b/src/qml/qml/qqmlvaluetypewrapper_p.h @@ -111,6 +111,7 @@ public: static bool virtualIsEqualTo(Managed *m, Managed *other); static PropertyAttributes virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p); static void virtualAdvanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes); + static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m); static ReturnedValue method_toString(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc); -- cgit v1.2.3