Skip to content
Verified Commit b8a53cef authored by ivan tkachenko's avatar ivan tkachenko 🗯
Browse files

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().

CCBUG: 468712

Test plan: $2625
parent 7abca989
Pipeline #413073 passed with stage
in 6 minutes and 17 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment