diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2022-07-12 16:08:17 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-07-19 10:52:31 +0200 |
| commit | ef057772c41e84e9813f0ed113fc55224013404c (patch) | |
| tree | 80d1a7247825bcfccb577ce2ab6c0f248d435439 /src/qml/jsruntime/qv4qobjectwrapper.cpp | |
| parent | b335d8311f7c0be9261305d5b41bbcbf94cd3d27 (diff) | |
Fix array-like methods on V4 sequences
We need to properly convert value type lists on assignment and we need
to add the "length" property to the own properties. Furthermore, the V4
sequence methods were confused about integer type ranges. We teach
them about qsizetype, properly range check everything, and drop the
artificial limitation to INT_MAX.
Pick-to: 6.4
Task-number: QTBUG-82443
Change-Id: Ie5af1130c9e78e412c171e6fa26a28a6a7a5d498
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 3fa107ebda..021872b7ad 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -597,7 +597,7 @@ void QObjectWrapper::setProperty( PROPERTY_STORE(QQmlScriptString, ss); } else { QVariant v; - if (property->isQList()) + if (property->isQList() && propType.flags().testFlag(QMetaType::IsQmlList)) v = scope.engine->toVariant(value, QMetaType::fromType<QList<QObject *> >()); else v = scope.engine->toVariant(value, propType); |
