Port KSMServer's KCM to KConfigXT
ClosedPublic

Authored by ervin on Nov 29 2019, 10:08 AM.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ervin created this revision.Nov 29 2019, 10:08 AM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 29 2019, 10:08 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ervin requested review of this revision.Nov 29 2019, 10:08 AM
mlaurent requested changes to this revision.Nov 29 2019, 10:35 AM
mlaurent added a subscriber: mlaurent.
mlaurent added inline comments.
kcms/ksmserver/kcmsmserver.h
51

it seems that ui is never deleted. (I can't see it deleted in destructor.)

This revision now requires changes to proceed.Nov 29 2019, 10:35 AM

So much red :D

kcms/ksmserver/kcmsmserver.cpp
203

This patch renames this entry "default" to "emptySession"

From what I can tell it won't matter for ksmserver itself as that only compares against the other two strings.

But if a user had this value set currently then opens the KCM afterwards, which value gets loaded?

ervin updated this revision to Diff 70551.Nov 29 2019, 10:42 AM

Add missing scoped pointer. I thought I did it, apparently just in my head. :-D

ervin added inline comments.Nov 29 2019, 10:46 AM
kcms/ksmserver/kcmsmserver.cpp
203

Yes, several reasons for that change: default doesn't play well as an enum value, also it wasn't the default at all... since restoring the previous session is.
In our case, if there's "default" in the file, it will in practice fallback to restore previous session which I think is fine as a behavior.

davidedmundson accepted this revision.Nov 29 2019, 12:20 PM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 29 2019, 12:25 PM
This revision was automatically updated to reflect the committed changes.