Skip to content

containments/panel: don't assign undefined to bool

Christoph Wolk requested to merge cwo/plasma-desktop:checked_no_undefined into master

3df3675f introduced a guard against currentApplet being null in the declaration of the panel spacer configuration popup switch, reducing warning messages on Plasmashell launch. However, as the value is assigned to a bool property there are still warning messages being produced, only now they happen in Panel Config mode.

This change explicitly sets the value to false if the expression evaluates to undefined, reducing unnecessary log spam.

Test plan:

  • Have panel with spacers, start plasmashell in terminal, open Panel Config mode, observe lots of "ConfigOverlay.qml:368:21: Unable to assign [undefined] to bool" messages
  • Apply change, repeat, messages are gone
  • Verify that the switch is still displayed correctly on spacers (on for variable size, off for fixed size)

Merge request reports

Loading