Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.9.0 Beta3
-
None
-
a370d086e (dev)
Description
Consider the following as found in our tests:
delegate: Rectangle { implicitWidth: 100 implicitHeight: 50 required property bool editing Text { anchors.centerIn: parent text: display } [...] }
This should not be possible. The "display" property is passed via the context here. Yet, the delegate has a required property.
The presence of required properties should force all data access to go through required properties. Context properties and scope properties can shadow each other. We want this to be as predictable as possible at compile time. That's the whole reason for required properties to exist.
The core of the problem is that QQmlTableInstanceModelIncubationTask duplicates QQDMIncubationTask's "incubating" member by introducing its own "modelItemToIncubate". This way, it can leave "incubating" at nullptr and effectively prevents initializeRequiredProperties() from resetting the contextObject.