DesktopPaths KCM: Move the settings logic to a KCoreConfigSkeleton class
ClosedPublic

Authored by ervin on Jan 3 2020, 11:55 AM.

Details

Summary

Our KCoreConfigSkeleton subclass is interestingly hand written since
it's too remote from what we usually do (the resulting file needs to be
sourceable and we don't want the usual behavior of removing keys when
they're set to defaults).

The only one which was "more standard" was the autostart path, but
really with the URL conversion on top and for just a single entry, I
shoved it in the hand written class as well.

Doesn't reduce the code much, but at least it separates that logic from
the KCM and it opens the door to properly working defaults button.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 20676
Build 20694: arc lint + arc unit
ervin created this revision.Jan 3 2020, 11:55 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 3 2020, 11:55 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ervin requested review of this revision.Jan 3 2020, 11:55 AM
bport added inline comments.Jan 6 2020, 8:03 AM
kcms/desktoppaths/desktoppathssettings.h
3

2019 => 2020

kcms/desktoppaths/desktoppathssettingsbase.kcfg
1 ↗(On Diff #72677)

I think we don't need this file

ervin updated this revision to Diff 72848.Jan 6 2020, 8:14 AM

Addresses bport comments

davidedmundson accepted this revision.Jan 8 2020, 10:13 AM
davidedmundson added inline comments.
kcms/desktoppaths/desktoppathssettings.cpp
38

This doesn't seem right. If I'm running in French, I should surely have "Les Documents" or whatever.

But this does seem to match the current code...so I guess that's a task for another day

kcms/desktoppaths/globalpaths.cpp
152

One of these duplicated lines can go

This revision is now accepted and ready to land.Jan 8 2020, 10:13 AM
This revision was automatically updated to reflect the committed changes.