[Componentchooser KCM] Make default browser app choice work even when combobox is not used

Authored by ngraham on Nov 27 2018, 12:24 AM.



BUG: 350663
FIXED-IN: 5.12.8

When choosing a default browser app using the app list combobox, the choice was only being saved after the combobox was used, because its signal was connected to an inline function that saved the choice, while the radio button that enabled the combobox was not. As a result, if you clicked on that radio button and didn't need to use the combobox because it was already showing your preferred browser, that action was not actually getting saved.

This patch fixes the situation my moving the inline function into a real explicit slot function and connecting the radio button to it as well.

Test Plan
  • Go to the component chooser KCM's default browser module
  • Reset to defaults, then leave the KCM and open it again
  • Click the in the following application radio button
  • Do NOT touch the combobox
  • Click Apply
  • Leave the KCM and come back

With this patch, the radio button's state is preserved and the correct browser is selected in the combobox.

Diff Detail

R119 Plasma Desktop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Nov 27 2018, 12:24 AM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 27 2018, 12:24 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Nov 27 2018, 12:24 AM
ngraham edited the summary of this revision. (Show Details)Nov 27 2018, 12:25 AM
davidedmundson accepted this revision.Nov 27 2018, 12:34 AM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.

this "emit" looks wrong

This revision is now accepted and ready to land.Nov 27 2018, 12:34 AM
ngraham added inline comments.Nov 27 2018, 12:38 AM

What should it be instead? That line is just copy-pasted from the original inline function.


just "configChanged();"

as it's a method not a signal.

ngraham updated this revision to Diff 46295.Nov 27 2018, 3:01 AM

Don't need to emit (everything still works)

ngraham marked 3 inline comments as done.Nov 27 2018, 3:01 AM
This revision was automatically updated to reflect the committed changes.