Skip to content

applets/weather: don't replace SwitchPanel pagesModel so often

Christoph Wolk requested to merge cwo/kdeplasma-addons:weather_fixed_list into master

The pagesModel that populates the TabBar/SwipeView for SwitchPanel is recomputed and replaced each time the underlying model is updated. This causes the Repeaters to recreate the delegates in turn, which are all linked to various things in bindings that are simultaneously being updated and deleted; as a consequence, many of the intermediate states get identified as binding loops and cause a whole slew of warnings to be printed.

Instead of recreating a list from scratch, we create a single list of QtObjects and fill them with values using bindings. This is more declarative in spirit, and solves the binding loop warnings.

Merge request reports

Loading