Add handling of value-type lists to QDeclarativeExpression::evaluate()
authorRobert Griebl <robert.griebl@pelagicore.com>
Wed, 30 Jul 2014 17:00:26 +0000 (19:00 +0200)
committerRobert Griebl <robert.griebl@pelagicore.com>
Tue, 5 Aug 2014 12:49:17 +0000 (14:49 +0200)
commitbb0239e9b3c0b1d00255ef9dfbb36c1ba4e2d123
tree5c99db90db11ddc7e62ff83ea3a9e2267a83abeb
parentec808b78e1b8d5cf128b3ef3e6933cb5ddd48544
Add handling of value-type lists to QDeclarativeExpression::evaluate()

QDeclarativeExpression::evaluate() converts all arrays to QList<QObject *>,
even if the items cannot be represented by a QObject *. In case of a
string-list, a QList of null-pointers is returned (which isn't very helpful).
This patch makes evaluate() convert arrays, which contain ONLY value-type
items, into a plain QVariantList.

Change-Id: I4e5052af9fb296a4b692df7840bdd188298f7416
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/declarative/qml/qdeclarativeengine.cpp
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp