diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-05-17 15:50:06 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-06-02 02:42:51 +0200 |
commit | e3e8008ec325bdc690fd9600025d66860cac5e62 (patch) | |
tree | e82ab867c272e042afc44c627a6f861c2a306418 /src/qml/qml/qqmlvmemetaobject.cpp | |
parent | 7bfbd706b56c426e2683e519543b56426310520f (diff) |
Allow retrieval of sequences from QJSValue
As we can store sequence types in QJSValue, we should be able to
retrieve them, too.
Move the declaration of the QV4::Sequence struct into a header to make
it less of a hassle to identify sequences.
Change-Id: I3e45bfe193c669107f90cd6c502765c0c9f60fb0
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index cd847903e4..919bbeb572 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -753,7 +753,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * } else if (QV4::MemberData *md = propertyAndMethodStorageAsMemberData()) { // Value type list QV4::Scope scope(engine); - QV4::ScopedObject sequence(scope, *(md->data() + id)); + QV4::Scoped<QV4::Sequence> sequence(scope, *(md->data() + id)); const void *data = sequence ? QV4::SequencePrototype::getRawContainerPtr(sequence, propType) : nullptr; @@ -849,7 +849,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * } else if (QV4::MemberData *md = propertyAndMethodStorageAsMemberData()) { // Value type list QV4::Scope scope(engine); - QV4::ScopedObject sequence(scope, *(md->data() + id)); + QV4::Scoped<QV4::Sequence> sequence(scope, *(md->data() + id)); void *data = sequence ? QV4::SequencePrototype::getRawContainerPtr(sequence, propType) : nullptr; |