Allow invokable functions of value-type classes to be called
authorChris Adams <christopher.adams@nokia.com>
Mon, 16 Jul 2012 06:32:49 +0000 (16:32 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 9 Aug 2012 05:58:06 +0000 (07:58 +0200)
commit42f9444e983b5257241c17242471ca63f208c3f6
tree4847ae743a0e05b0ff9d3d4ab6003ea257a6c682
parentf09517bd9c907698a05ee92ccf158a06db3340b8
Allow invokable functions of value-type classes to be called

Previously, invokable functions of value-type classes were returned as
properties.  This commit fixes that bug by allowing such functions to
be invoked normally.  It also improves copy-value type handling.

This commit also ensures that QMatrix4x4 value types are constructed
with qreal values as this is the storage type used internally.

Change-Id: Iab0fe4c522ed53d60154e8a8d46dda925fb9f4de
Reviewed-by: Martin Jones <martin.jones@nokia.com>
14 files changed:
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
src/qml/qml/v8/qv8qobjectwrapper.cpp
src/qml/qml/v8/qv8valuetypewrapper.cpp
src/quick/doc/src/qmltypereference.qdoc
src/quick/util/qquickglobal.cpp
src/quick/util/qquickvaluetypes.cpp
src/quick/util/qquickvaluetypes_p.h
tests/auto/qml/qqmlvaluetypeproviders/data/invokableFunctions.qml [new file with mode: 0644]
tests/auto/qml/qqmlvaluetypeproviders/tst_qqmlvaluetypeproviders.cpp
tests/auto/qml/qqmlvaluetypes/data/matrix4x4_invokables.qml [new file with mode: 0644]
tests/auto/qml/qqmlvaluetypes/data/vector2d_invokables.qml [new file with mode: 0644]
tests/auto/qml/qqmlvaluetypes/data/vector3d_invokables.qml [new file with mode: 0644]
tests/auto/qml/qqmlvaluetypes/data/vector4d_invokables.qml [new file with mode: 0644]
tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp