[Media Controller] Fix unwanted seeking
ClosedPublic

Authored by broulik on Sep 3 2016, 12:16 PM.

Details

Summary

This works around a bug or strange behavior in QtQuick Controls Slider where when reducing the maximumValue, the value is clamped to it (ie. reduced to it) but when increasing it again, it gets its old value back up until maximumValue.

Test Plan
slider.maximumValue = 1000
slider.value = 1000 // value is now 1000
slider.maximumValue = 0 // value is now 0
slider.maximumValue = 500 // value is now 500!
slider.maximumValue = 1500 // value is now 1000

I started one song song, seeked all the way to the end, it stopped. I started again.
Previously it would immediately seek to the end of the track. Now it would just carry on as normal.

If you drag the slider all the way to the end and just keep it there and wiggle the mouse around you can still cause havoc but that's nothing that'll happen during normal use :P

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.
broulik updated this revision to Diff 6411.Sep 3 2016, 12:16 PM
broulik retitled this revision from to [Media Controller] Fix unwanted seeking.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R120 Plasma Workspace.
Restricted Application added a project: Plasma. · View Herald TranscriptSep 3 2016, 12:16 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik edited the test plan for this revision. (Show Details)Sep 3 2016, 12:18 PM
broulik edited the test plan for this revision. (Show Details)
davidedmundson accepted this revision.Sep 3 2016, 12:54 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Sep 3 2016, 12:54 PM
This revision was automatically updated to reflect the committed changes.