Adjust QtQuickSettings KCM to use KConfigXT in full

Authored by ervin on Oct 30 2019, 10:56 AM.



This removes quite a lot of uneeded code and fixes the automatic default
handling from KConfigXT point of view (this was the wrong integration
scheme with combo boxes).

It also gives me a nice testing ground for a widget based KCM usable
with kcmshell. :-)

Diff Detail

R119 Plasma Desktop
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 18350
Build 18368: arc lint + arc unit
ervin created this revision.Oct 30 2019, 10:56 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 30 2019, 10:56 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ervin requested review of this revision.Oct 30 2019, 10:56 AM

That's significantly tidier!


Will this mean we write "automaticloop" to the config file?

If so, we'll need to change the KQuickAddons::QtQuickSettings::init
As it passes the variables in the config directly to Qt envs, which wouldn't be ideal.

ervin added inline comments.Oct 30 2019, 11:35 AM

Nope. KConfigXT is so clever that if you write a value which is the default to it, it kills the key in the config file instead. :-)

This is why you always want KConfigXT btw, managing defaults is error prone, people forget to kill the key when they do readEntry/writeEntry manually... which means you got something in the config file when the default changes, so you don't see the new default.

davidedmundson accepted this revision.Oct 30 2019, 11:39 AM
This revision is now accepted and ready to land.Oct 30 2019, 11:39 AM
This revision was automatically updated to reflect the committed changes.