- https://codereview.qt-project.org/c/qt/qtdeclarative/+/282546 resulted in some warnings being printed: https://bugreports.qt.io/browse/QTBUG-81976
- https://codereview.qt-project.org/c/qt/qtdeclarative/+/290237 was introduced to fix the warning
- https://codereview.qt-project.org/c/qt/qtdeclarative/+/291389 reverted the warning because it is a "dubious use case"
Currently, binding to the parent is not discouraged by documentation, and never has been. ListView's documentation even states what the parent of a delegate is:
Delegates are instantiated as needed and may be destroyed at any time. They are parented to ListView's contentItem, not to the view itself. State should never be stored in a delegate.
Whatever we decide on doing, we need to document it comprehensively, so that everyone is aware of the change in behaviour. As it stands now, users are going to run into a tonne of warnings in 5.15, and will have no documentation (or even a ChangeLog entry) to guide them.
- Add a ChangeLog entry somehow
- Update the "They are parented to ListView's contentItem" line in ListView's documentation
- Add a paragraph explaining that binding to parent should be avoided and why, and link to this section in the \sa of ListView's delegate documentation