[kcms/feedback] Fix slider value
ClosedPublic

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

Details

Summary

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

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