Skip to content

Dialog: Moar null-safety

ivan tkachenko requested to merge work/r/dialog-null into master

Fix ScrollView::contentItem management

ScrollView is expected to always report its contentItem as some kind of Flickable. But an extra check wouldn't hurt for QML compiler and type hints. Since the check was already there, let's lift it up a bit, so that it covers both assignments. Also, that qualified property access isn't needed inside the Qt.binding() statement, and the statement itself can be simplified to an expression.

The top-level component must not assume that its parent is always present and valid.

The previous attempt in 9332c118 was almost perfect, but it messed up with the top level component's parent binding, which was never not correct to bind to a Popup's own Overlay.overlay attached property so it caused regressions and the patch got reverted as a whole.

Edited by ivan tkachenko

Merge request reports

Loading