KCM launchfeedback : port to KConfig XT

Authored by crossi on Nov 13 2019, 4:14 PM.



Simple KCM, all settings' states are automatically handled thanks to ManagedConfigModule.

Diff Detail

R119 Plasma Desktop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
crossi created this revision.Nov 13 2019, 4:14 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 13 2019, 4:14 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
crossi requested review of this revision.Nov 13 2019, 4:14 PM

So much red!

Wow, we're almost at a stage where we don't need to load a C++ plugin at all.


This is a bit of a boolean trap.

We could declare an enum in QML
setCursorSettings(Busy | Blinking) would be a bit nicer maybe?

Up to you.


onToggled is called both when it is checked, and presumably when it is unchecked (or another button is checked)

I assume we want something more like:

onToggled: {if (!checked) return; formLayout.setCursorSettings(false,...}


taskar -> taskbar

davidedmundson requested changes to this revision.Nov 14 2019, 11:11 AM
This revision now requires changes to proceed.Nov 14 2019, 11:11 AM
broulik added inline comments.

Yes, I would prefer all of this to be abstracted away from the QML, the checked bindings area also quite messy


onToggled fires when user explicitly toggles it by clicking it. Given you can't "untoggle" a radio button should be fine-ish?


Use onValueModified which only fires when the user explicitly changes it, not because of some binding updates

crossi added inline comments.Nov 14 2019, 12:36 PM

I agree it's a bit tricky, we have a kind of enum choice written as a binary representation in the config file.

Will try to work it with a QML enum to make it less confusing.


According to Qt documentation :

This signal is emitted when a checkable button is interactively toggled by the user via touch, mouse, or keyboard.

Since it's a radio button, you can't uncheck it, so the signal is emitted only when checked. I've tested both as I first tought like david said.


Sounds better. wiil fix.


good catch, thanks. will fix.

crossi updated this revision to Diff 69745.Nov 14 2019, 1:02 PM

Use proper signal handler & Fix typo

ervin added inline comments.Nov 15 2019, 7:15 AM

Or... but that's more work and I'd say it should come in another patch on top of that one. We migrate the config file to use an enum all the way. This boolean trap exists in the config after all.

crossi updated this revision to Diff 69794.Nov 15 2019, 11:00 AM

Add enum declaration to make boolean settings in qml a bit more readable.

crossi added inline comments.Nov 15 2019, 11:10 AM

Added enum to remove the triple boolean parameter.

To solve the boolean trap, it means to change the config to an enum instead of 3 booleans. This patch is intended to port Launch Feedback to KConfig XT, we could fix the configuration issue in another patch.

davidedmundson accepted this revision.Nov 15 2019, 2:32 PM
This revision is now accepted and ready to land.Nov 15 2019, 2:32 PM
ervin accepted this revision.Nov 18 2019, 7:34 AM
This revision was automatically updated to reflect the committed changes.