Fix composite type property support
authorChris Adams <christopher.adams@nokia.com>
Wed, 9 May 2012 02:21:41 +0000 (12:21 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 16 May 2012 00:14:57 +0000 (02:14 +0200)
commit14e247e4b94df17ed62750b4468c2ac25aabe30f
tree59784d82bbc05887c6c11e7babdf9cc5575c345a
parentb22496ba74c0106d949b970fb799fd3fa81243c4
Fix composite type property support

The metatype changes caused a regression in composite type properties
for which there was no autotest.  In particular, declarative previously
used the transitional QMetaType::registerType() function, whose
implementation specifies a zero-size, which means that accessing a
property of that type via QObject::property would fail.

This commit adds some unit tests to track the issue, and also fixes the
implementation of QQmlEnginePrivate::registerCompositeType to use the
updated metatype registration functions.

Task-number: QTBUG-25697
Change-Id: Ic4abc1711aee8cf4a50a2ef1769465ef73f5d022
Reviewed-by: JÄ™drzej Nowacki <jedrzej.nowacki@nokia.com>
src/qml/qml/qqmlengine.cpp
tests/auto/qml/qqmlproperty/data/SecondComponent.qml [new file with mode: 0644]
tests/auto/qml/qqmlproperty/data/componentDir/FirstComponent.qml [new file with mode: 0644]
tests/auto/qml/qqmlproperty/data/registeredCompositeTypeProperty.qml [new file with mode: 0644]
tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp