KCM: Show only available device profiles

Authored by drosca on Jan 27 2018, 5:54 PM.



CCBUG: 365723

Test Plan

Unavailable profiles are now filtered out

Diff Detail

R115 Plasma Audio Volume Applet
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
drosca created this revision.Jan 27 2018, 5:54 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 27 2018, 5:54 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
drosca requested review of this revision.Jan 27 2018, 5:54 PM
broulik added a subscriber: broulik.Feb 2 2018, 8:39 PM
broulik added inline comments.
model: Profiles.filter(function (profile) {
    return profile.availability === Profile.Available;
nicolasfella requested changes to this revision.Feb 2 2018, 9:58 PM
nicolasfella added a subscriber: nicolasfella.

This leads to the wrong profile being selected. Because some profiles are excluded from the model the indices don't match anymore.

This revision now requires changes to proceed.Feb 2 2018, 9:58 PM
drosca updated this revision to Diff 26480.Feb 4 2018, 8:26 AM

Fixed issues

nicolasfella accepted this revision.Feb 4 2018, 1:01 PM

Looks good to me

This revision is now accepted and ready to land.Feb 4 2018, 1:01 PM
ngraham added a subscriber: ngraham.Feb 4 2018, 9:20 PM

Does this fully fix 365723? And if not, what more is needed there?

This revision was automatically updated to reflect the committed changes.

@ngraham It needs "better" filtering as suggested in the bugreport.