Partial fix for deferred properties when combined with components
authorAlan Alpert <aalpert@blackberry.com>
Wed, 15 May 2013 19:53:11 +0000 (12:53 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 22 May 2013 17:46:35 +0000 (19:46 +0200)
commit2f988d4b65428d03f3e3fee383787106b3f38c35
tree6eb3c51a103f115f1b69826abe2b196027d7d7c3
parent2074386df9ce8a72b6fb2553bb7a5a353964c7b4
Partial fix for deferred properties when combined with components

Current deferred properties implementation did not store context
or compiled data pointers correctly. Those pointers are now stored
when the defer is reached, so as to avoid confusion (confusion leads
to asserts or crashes).

Does not extend the deferred property support to allow multiple
deferred blocks per item. This now prints and error and the side
effect is only that one of the deferred blocks is lost. This use
case is sufficiently rare that it may not be worth the cost.

Task-number: QTBUG-30325
Change-Id: I80cb074ed4452e95020208a0142a91e721bced7d
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/qqmlcompileddata.cpp
src/qml/qml/qqmldata_p.h
src/qml/qml/qqmlengine.cpp
src/qml/qml/qqmlinstruction.cpp
src/qml/qml/qqmlvme.cpp
tests/auto/qml/qqmlecmascript/data/MyDeferredComponent.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/MyDeferredComponent2.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/deferredPropertiesInComponents.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp