https://bugs.kde.org/show_bug.cgi?id=468712
--- Comment #17 from ratijas <[email protected]> --- Git commit b8a53cef1664bcef85c04db4e647024982a5140c by ivan tkachenko. Committed on 07/06/2023 at 15:37. Pushed by ratijas into branch 'master'. FormLayoutAttached: Fix checks in setter of buddyFor property, add tests Previous check didn't allow setting buddy for more than once (except for marginal case of setting deeper and deeper children, which isn't well supported by positioning code anyway). Not a highly needed feature, but it better be working properly. Also the code did not perform any checks that old m_buddyFor was non-null pointer, so the whole thing only worked because internally QQuickItem::isAncestorOf does not use any of the properties of `this` object, and only does checked parent() calls on its argument and compares results as raw pointers. Neither did it reset back to default (attachee) object if/when buddy is dynamically destroyed, so now there are reconnects in setter, and corresponding tests with a signal spy, Repeater and Component::createObject(). Test plan: https://invent.kde.org/frameworks/kirigami/-/snippets/2625 M +235 -2 autotests/tst_formlayout.qml M +37 -3 src/formlayoutattached.cpp M +7 -1 src/formlayoutattached.h https://invent.kde.org/frameworks/kirigami/-/commit/b8a53cef1664bcef85c04db4e647024982a5140c -- You are receiving this mail because: You are watching all bug changes.
