kcm/kwinrules: Manage RuleSettings instead of Rules objects
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.
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)