Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
None
Description
In Binding's late-bound mode, if an alias rather than a property is declared, The synchronization of the properties shall happen in both directions. For examples:
Binding { target: foo property alias bar: other.baz }
This would listen for changes to foo.bar as well as other.baz (via the actually existing alias) and update either of those when the other one changes.
foo.bar retroactively "becomes" an alias of other.baz this way.
An interesting question here is what happens to restoreMode. We potentially have two properties to restore if the binding is deactivated. The easiest way to deal with that is lazy breaking and restoring of bindings. Whenever, during an update of the properties, we see a binding break on one side of the retroactive alias, we stash away the broken binding, overwriting any previous stashed binding we may have for that side. When the Binding element is deactivated, we restore whatever we have at that point, using the restoreMode rules.