Skip to content

devicenotifier: Refactor most delegate's properties into functions

ivan tkachenko requested to merge work/ratijas/devicenotifier-v1 into master
  1. Short-circuiting on undefined isn't an outcome that bool property would accept without complaints.

  2. Properties act as a caching layer. And cache invalidation is hard. With inherently non-deterministic order of property change signals in QML, downstream consumers may receive updates in order which would lead to accessing stale data from not-yet-updated dependent properties. Methods solve this issue by evaluating the whole expression with all the conditional guards every time, while still binding to change signals of every property it gets to READ along the way.

Note: hasMessage & message pair of properties will be refactored in a similar way later™.

Edited by ivan tkachenko

Merge request reports