Don't call setDefaultSink/Source when already default
ClosedPublic

Authored by drosca on Jun 1 2017, 7:41 AM.

Details

Summary

Checked state changes are not correctly handled in default device
QtQuickControls checkbox in KCM (changes are applied also for non-user
initiated, eg. on component complete).
This triggers setting the default device when opening KCM which moves all
streams to that device, and it breaks any previous manual configuration
(moving streams to different devices).

Make sure we call setDefaultSink/Source only when the default device
is actually different.

BUG: 380414
FIXED-IN: 5.10.1

Test Plan

No more unnecessary setDefaultSink/Source calls on opening KCM.

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.
drosca created this revision.Jun 1 2017, 7:41 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 1 2017, 7:41 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Jun 1 2017, 7:44 AM
This revision is now accepted and ready to land.Jun 1 2017, 7:44 AM
This revision was automatically updated to reflect the committed changes.