aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data/earlyIdObjectAccess.qml
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash with early QObject property accessSimon Hausmann2014-08-251-0/+23
In the reported bug, it can happen that we try to access the compile-time resolved QObject property of an object that is referenced by id. The binding that uses this is triggered when the property changes but _also_ when the id referenced object gets either created or deleted. The first time the binding is evaluated is very early on, when the id referenced object is not created yet, so the binding evaluation fails. However the dependency is set up, and so later then the id referenced object is created and the id property is set on the context, the notification triggers and the binding is re-evaluated. During that binding evaluation a QObject property access happens by index on an object that doesn't have its VME meta-object set up yet. Therefore the property access fails and a crash occurs or the Q_ASSERT(property) assertion fails. The fix is to set register the id named object in the context _after_ the VME meta-object is setup. Task-number: QTBUG-40018 Change-Id: Ic2d7b4a0c49635efe68e93f2f6c316eb65f0c309 Reviewed-by: Lars Knoll <lars.knoll@digia.com>