[kcms/feedback] Fix slider value

Authored by davidedmundson on Jan 15 2020, 12:56 AM.



If the kcm's property changes externally we don't update the slider
after the initial load, which is before KConfigModule::load which actually sets
the property.

Whilst there is an alternative fix calling load() a second time, we need
this anyway for default and reset buttons to work correctly.

I also think the original code was broken, I don't see why we would map
the value back to modeOptions[idx], we want the slider value to be the
index of the array, not the enum value. They just happen to be the same.

Test Plan

Opened KCM changed it, opened KCM repeat

Diff Detail

R120 Plasma Workspace
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 15 2020, 12:56 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jan 15 2020, 12:56 AM
ngraham accepted this revision.Jan 15 2020, 2:54 AM
This revision is now accepted and ready to land.Jan 15 2020, 2:54 AM
This revision was automatically updated to reflect the committed changes.