Fix speaker test not showing sinks/buttons

Authored by nicolasfella on Aug 31 2019, 10:19 PM.

Description

Fix speaker test not showing sinks/buttons

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

Reviewers: Plasma, drosca, ngraham

Reviewed By: ngraham

Subscribers: aacid, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D23620

Details

Committed
nicolasfellaSep 1 2019, 10:16 AM
Reviewer
ngraham
Differential Revision
D23620: Fix speaker test not showing sinks/buttons
Parents
R115:e4cd6f30eb4f: [Microphone Indicator] Don't show if there are no microphones
Branches
Unknown
Tags
Unknown