summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2015-01-08 15:33:34 (GMT)
committerRobert Griebl <robert.griebl@pelagicore.com>2015-01-08 15:47:10 (GMT)
commit6f55f3dbbb2cdae33a8b0d00b7bf2ada7fe79a04 (patch)
tree67f5fd2f54ecc3c3dd4fd25a377422ca279773ec /src
parent18c5ff04103eadcb532d03d526714385943295ab (diff)
downloadQt-6f55f3dbbb2cdae33a8b0d00b7bf2ada7fe79a04.zip
Qt-6f55f3dbbb2cdae33a8b0d00b7bf2ada7fe79a04.tar.gz
Qt-6f55f3dbbb2cdae33a8b0d00b7bf2ada7fe79a04.tar.bz2
Fix empty arrays in QML 1
Commit bb0239e added a regression, where empty arrays would produce errors in QML 1. Task-number: QTBUG-43656 Change-Id: I6d416b2387a1dfd3588c000368fc1223d08399bd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-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 52e5074..8885f40 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -2145,6 +2145,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;