Fix speaker test not showing sinks/buttons
ClosedPublic

Authored by nicolasfella on Sat, Aug 31, 10:24 PM.

Details

Summary

Initially no sink is selected in the combobox which leads to an empty speaker test widget. Furthermore, when only one sink is available the combobox isn't shown at all, resulting in the speaker test not working because currentIndex will be -1.

Fix this by setting the initial index to 0 and use 0 instead of -1 for querying model data when the combobox isn't shown

Test Plan

With 1 available sink speaker test works. With two available sinks the first one is selected at startup, speaker test works

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Sat, Aug 31, 10:24 PM
Restricted Application added a project: Plasma. · View Herald TranscriptSat, Aug 31, 10:24 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
nicolasfella requested review of this revision.Sat, Aug 31, 10:24 PM

@aacid IIRC you reported this issue to me at the Valencia sprint

ngraham accepted this revision.Sun, Sep 1, 3:32 AM
This revision is now accepted and ready to land.Sun, Sep 1, 3:32 AM
This revision was automatically updated to reflect the committed changes.