diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2015-01-08 15:48:28 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2015-01-08 15:59:44 +0100 |
commit | e9398ba4e7512ae53e617dcb3a3577c14b43fe7d (patch) | |
tree | 4abb7d3d0160cfe6bef085449714b8554ff3d88d /src/declarative/qml | |
parent | a03c5699af133272daad5303956768893e6695bf (diff) | |
download | qtquick1-e9398ba4e7512ae53e617dcb3a3577c14b43fe7d.tar.gz |
Fix empty arrays in QML 1
Commit 9cbb6fa added a regression, where empty arrays would produce errors
in QML 1.
Change-Id: Ie5c784d5ec921d1ca69084750ed37fc2e273bbef
Task-number: QTBUG-43656
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 682c8267..14f3c95c 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -2125,6 +2125,8 @@ QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val if (val.isArray()) { int length = val.property(QLatin1String("length")).toInt32(); + if (!length) + containsQObjects = true; for (int ii = 0; ii < length; ++ii) { if (val.property(ii).isQObject()) { containsQObjects = true; |