Skip to content

applet: Fix enabled states of Wi-Fi and WWAN checkboxes in Edit Mode

ivan tkachenko requested to merge work/ratijas/toolbar-states into master

We don't have full control over enabled property all the time, as it inherits its state through parent-child chain in QML. Instead of reusing it for custom logic, just introduce a new property for that.

This patch replaces assignments with bindings, and drops two extra signal handlers which are not needed anymore because the property they were updating is now a reliable readonly boolean.

Test plan:

  • Add a Networks applet to a desktop,
  • Expand it, so it always shows its "full representation",
  • Enable Wi-Fi and enter edit mode.

Wi-Fi checkbox should become disabled but remain in a checked state like this:

image

Edited by ivan tkachenko

Merge request reports