Simple KCM, all settings' states are automatically handled thanks to ManagedConfigModule.
Details
- Reviewers
ervin bport mart davidedmundson - Group Reviewers
Plasma - Commits
- R119:ff86f0abb454: KCM launchfeedback : port to KConfig XT
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.
Wow, we're almost at a stage where we don't need to load a C++ plugin at all.
kcms/launch/package/contents/ui/main.qml | ||
---|---|---|
34–37 | This is a bit of a boolean trap. We could declare an enum in QML Up to you. | |
46 | 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,...} | |
97 | taskar -> taskbar |
kcms/launch/package/contents/ui/main.qml | ||
---|---|---|
34–37 | Yes, I would prefer all of this to be abstracted away from the QML, the checked bindings area also quite messy | |
46 | onToggled fires when user explicitly toggles it by clicking it. Given you can't "untoggle" a radio button should be fine-ish? | |
95 | Use onValueModified which only fires when the user explicitly changes it, not because of some binding updates |
kcms/launch/package/contents/ui/main.qml | ||
---|---|---|
34–37 | 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. | |
46 | According to Qt documentation :
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. | |
95 | Sounds better. wiil fix. | |
97 | good catch, thanks. will fix. |
kcms/launch/package/contents/ui/main.qml | ||
---|---|---|
34–37 | 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. |
kcms/launch/package/contents/ui/main.qml | ||
---|---|---|
34–37 | 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. |