[KCM/Desktop] Use KConfig XT to store virtualdesktops related settings
ClosedPublic

Authored by meven on Dec 11 2019, 7:54 AM.

Details

Summary

Use a kcfg file to specify virtual desktops settings saved to kwinrc.

Test Plan

kcmshell5 kcm_kwin_virtualdesktops
Change something, check apply buttons works appropriately
Save the settings and relaunch the kcm, the new settings are taken loaded correctly

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
meven created this revision.Dec 11 2019, 7:54 AM
Restricted Application added a project: KWin. · View Herald TranscriptDec 11 2019, 7:54 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
meven requested review of this revision.Dec 11 2019, 7:54 AM
meven edited the summary of this revision. (Show Details)Dec 11 2019, 8:20 AM
meven edited the test plan for this revision. (Show Details)
meven edited the summary of this revision. (Show Details)Dec 11 2019, 8:23 AM
ervin requested changes to this revision.Dec 11 2019, 9:21 AM

Mostly looks good, needs some tuning in the kcfg to make the generated code API nicer on the C++ side.

kcmkwin/kwindesktop/virtualdesktopssettings.kcfg
9

I'd use rollOverDesktop for the name parameter to have proper camel casing on the C++ side

15

I'd use desktopChangeOsdEnabled for the name parameter to have proper camel casing on the C++ side

This revision now requires changes to proceed.Dec 11 2019, 9:21 AM
meven updated this revision to Diff 71253.Dec 11 2019, 9:43 AM

Camel case kcfg entries names

meven marked 2 inline comments as done.Dec 11 2019, 9:44 AM
ervin accepted this revision.Dec 11 2019, 9:45 AM
This revision is now accepted and ready to land.Dec 11 2019, 9:45 AM
This revision was automatically updated to reflect the committed changes.
davidedmundson added inline comments.
kcmkwin/kwindesktop/virtualdesktops.cpp
173

I would like this to to take these settings from the kcfg defaults

250

Out of curiosity, is there anything blocking us using KQuickAddons::ManagedConfigModule as the base?

ervin added inline comments.Dec 11 2019, 12:42 PM
kcmkwin/kwindesktop/virtualdesktops.cpp
173

Good point, definitely missing

250

Nothing, but Méven is going incremental here

meven added inline comments.Dec 11 2019, 12:44 PM
kcmkwin/kwindesktop/virtualdesktops.cpp
173

This was going to be removed anyway : D25881

crossi added a subscriber: crossi.Dec 11 2019, 2:28 PM
crossi added inline comments.Dec 11 2019, 2:37 PM
kcmkwin/kwindesktop/virtualdesktopssettings.kcfg
20

Should use popupHideDelay for name attribute

24

Should use textOnly for name attribute