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

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

Details

Summary

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

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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.
kcms/componentchooser/componentchooserbrowser.cpp
49

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
kcms/componentchooser/componentchooserbrowser.cpp
49

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

kcms/componentchooser/componentchooserbrowser.cpp
49

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.