diff options
author | Lars Knoll <[email protected]> | 2018-06-19 21:29:01 +0200 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2018-06-26 10:03:46 +0000 |
commit | 53adb5bbc659f4ae78427b0b1925bf9732d8a6e5 (patch) | |
tree | c45d87219ef000d09c514b3800564d896ce4b95f /src/qml/jsruntime/qv4sequenceobject.cpp | |
parent | 89f585157af905d45012dbd9c079c48491e5211d (diff) |
Unify deleteProperty and deleteIndexedProperty vtable methods
Change-Id: I25245818c6ff2104642594476cb9684bac824f29
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4sequenceobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4sequenceobject.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index f0aa39b786..f6f8e51e19 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -569,8 +569,14 @@ public: { return static_cast<QQmlSequence<Container> *>(that)->containerPutIndexed(index, value); } static QV4::PropertyAttributes queryIndexed(const QV4::Managed *that, uint index) { return static_cast<const QQmlSequence<Container> *>(that)->containerQueryIndexed(index); } - static bool deleteIndexedProperty(QV4::Managed *that, uint index) - { return static_cast<QQmlSequence<Container> *>(that)->containerDeleteIndexedProperty(index); } + static bool deleteProperty(QV4::Managed *that, Identifier id) + { + if (id.isArrayIndex()) { + uint index = id.asArrayIndex(); + return static_cast<QQmlSequence<Container> *>(that)->containerDeleteIndexedProperty(index); + } + return Object::deleteProperty(that, id); + } static bool isEqualTo(Managed *that, Managed *other) { return static_cast<QQmlSequence<Container> *>(that)->containerIsEqualTo(other); } static void advanceIterator(Managed *that, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attrs) |