aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qobjectwrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 6a0142a46e..38b9226c9f 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -205,12 +205,12 @@ static ReturnedValue loadProperty(
// See if it's a sequence type.
// Pass nullptr as data. It's lazy-loaded.
- QV4::ScopedValue retn(scope, QV4::SequencePrototype::newSequence(
- v4, propMetaType, nullptr,
- wrapper, property.coreIndex(),
- referenceFlags(scope.engine, property)));
- if (!retn->isUndefined())
- return retn->asReturnedValue();
+ const QQmlType qmlType = QQmlMetaType::qmlListType(propMetaType);
+ if (qmlType.isSequentialContainer()) {
+ return QV4::SequencePrototype::newSequence(
+ v4, propMetaType, qmlType.listMetaSequence(), nullptr,
+ wrapper, property.coreIndex(), referenceFlags(scope.engine, property));
+ }
QVariant v(propMetaType);
property.readProperty(object, v.data());