Add an expected keyword to QML. expected properties behave similar to normal properties, except that we will emit a warning/error when they are not set.
One of the primary use cases for this are delegates. Instead of accessing model properties "via magic" in the delegate, we could then use expected properties instead.
The logic there would be that:
- if there are no expected properties, we use the same behavior as before and simply inject the model properties
- if a model contains at least one expected property, we set that property to match the model's role. We do not inject any properties from the model which are not expected
- if there is an expected property, and it is not in the model, we issue a warning