summaryrefslogtreecommitdiff
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2015-01-08 15:48:28 +0100
committerRobert Griebl <robert.griebl@pelagicore.com>2015-01-08 15:59:44 +0100
commite9398ba4e7512ae53e617dcb3a3577c14b43fe7d (patch)
tree4abb7d3d0160cfe6bef085449714b8554ff3d88d /src/declarative/qml
parenta03c5699af133272daad5303956768893e6695bf (diff)
downloadqtquick1-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.cpp2
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;