Skip to content

kcm/kwinrules: Manage RuleSettings instead of Rules objects

Ismael Asensio requested to merge work/iasensio/use_rulesettings into master

The KCM now manages the RuleSettings config objects directly, instead of using a list of Rules objects as an intermediary.

This highly reduces the overhead, improving loading and saving times and memory. A quick local test with 1000 rules reduces the loading time from +10sec to a split second.

It also enables a better use of KConfig capabilites. The config state is now automatically tracked by KConfigXT objects. Whenever the user edits either the rule list, or any specific property within a rule, the needsSave state is updated accordingly.

rules_change_tracking

CCBUG: 421564

The first commit should be kept separate (not squashed). It adds the relevant accesor methods to the RuleSettings list. There, we also add a new stringlist setting to store the rules group names and their order, required to make it work. It superseedes !796 (closed)

Edited by Ismael Asensio

Merge request reports