Skip to content

devicenotifier: Fix typing errors in property bindings, and other code improvements

ivan tkachenko requested to merge work/ratijas/devicenotifier into master

Fix bindings for boolean properties

Short-circuiting on undefined isn't an outcome that bool property would accept without complaints.

Port away from DefaultMethod feature

qt.qml.defaultmethod: Assigning an object to a signal handler is deprecated.Instead, create the object, give it an id, and call the desired slot from the signal handler.

Don't use one property as a safeguard to another

Propagation order of property change events is intentionally non-deterministic, so depending on another property to provide safety checks for nullable object access is an error-prone race condition.

One possible way around this limitation would be using functions, since evaluating them in binding context would also bind to everything accessed as with normal expressions. But in this case even a function is not really needed, as a simple null check just works.

Clean up some redundant qualified property accesses

Port from context properties to ComponentBehavior: Bound

Because Explicit is better than implicit. Zen of Python, anyone?

Merge request reports

Loading