Ensure that copy sequences can be passed as arguments
authorChris Adams <christopher.adams@nokia.com>
Wed, 8 Aug 2012 04:53:45 +0000 (14:53 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 9 Aug 2012 03:57:33 +0000 (05:57 +0200)
commitf09517bd9c907698a05ee92ccf158a06db3340b8
treec8bae3c214f06c1293d3f0706960f7139dc999db
parent9c2ab7af355d0132af771f8784e42c13d1f49183
Ensure that copy sequences can be passed as arguments

Previously, automatic conversion from JS array to sequence copy
resource was not performed in the case where the array was passed as
a parameter to a QObject function invocation.  This commit adds code
to check if the parameter type is a sequence type - and if so, and if
the value is a variantlist, we convert it to a sequence of the
appropriate type.

Change-Id: I3cc3e2f95604bc71d1d8d237e1acffa1e03b78ba
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
src/qml/qml/v8/qv8qobjectwrapper.cpp
src/qml/qml/v8/qv8sequencewrapper.cpp
src/qml/qml/v8/qv8sequencewrapper_p.h
tests/auto/qml/qqmlecmascript/data/sequenceConversion.copy.qml
tests/auto/qml/qqmlecmascript/testtypes.cpp
tests/auto/qml/qqmlecmascript/testtypes.h
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp