aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4sequenceobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-08-02 16:54:59 +0200
committerLars Knoll <lars.knoll@qt.io>2018-08-02 20:25:55 +0000
commita88f01364e147d9ea093bf0fdc639b45feef1788 (patch)
treecf1c49dee57f1c691eeecd633bffd0601256f236 /src/qml/jsruntime/qv4sequenceobject.cpp
parent0d63c22eee293fe59d7691608deaaf3468045eb3 (diff)
Implement ObjectIterator using the new iteration mechanism
And with that get rid of the old advanceIterator methods. Change-Id: I969fa89d25df8992a4b08c8c081b91c92ffdfddd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4sequenceobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp
index ab05a819c1..da5aa17719 100644
--- a/src/qml/jsruntime/qv4sequenceobject.cpp
+++ b/src/qml/jsruntime/qv4sequenceobject.cpp
@@ -342,29 +342,6 @@ public:
return (index < size_t(d()->container->size())) ? QV4::Attr_Data : QV4::Attr_Invalid;
}
- void containerAdvanceIterator(ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attrs)
- {
- name->setM(nullptr);
- *index = UINT_MAX;
-
- if (d()->isReference) {
- if (!d()->object) {
- QV4::Object::virtualAdvanceIterator(this, it, name, index, p, attrs);
- return;
- }
- loadReference();
- }
-
- if (it->arrayIndex < static_cast<uint>(d()->container->size())) {
- *index = it->arrayIndex;
- ++it->arrayIndex;
- *attrs = QV4::Attr_Data;
- p->value = convertElementToValue(engine(), d()->container->at(*index));
- return;
- }
- QV4::Object::virtualAdvanceIterator(this, it, name, index, p, attrs);
- }
-
struct OwnPropertyKeyIterator : ObjectOwnPropertyKeyIterator
{
~OwnPropertyKeyIterator() override = default;
@@ -619,8 +596,6 @@ public:
}
static bool virtualIsEqualTo(Managed *that, Managed *other)
{ return static_cast<QQmlSequence<Container> *>(that)->containerIsEqualTo(other); }
- static void virtualAdvanceIterator(Managed *that, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attrs)
- { return static_cast<QQmlSequence<Container> *>(that)->containerAdvanceIterator(it, name, index, p, attrs); }
static QV4::OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m)
{ return static_cast<const QQmlSequence<Container> *>(m)->containerOwnPropertyKeys(m);}