Have KCModuleProxy take care of the defaulted state
ClosedPublic

Authored by ervin on Oct 30 2019, 11:04 AM.

Details

Summary

Now that KCModule exposes a defaulted() signal, consume it and keep our
own defaulted state up to date. This is exposed for further consumption
in the GUIs integrating KCModuleProxy.

This depends on: https://phabricator.kde.org/D25069

Diff Detail

Repository
R295 KCMUtils
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ervin created this revision.Oct 30 2019, 11:04 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 30 2019, 11:04 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ervin requested review of this revision.Oct 30 2019, 11:04 AM
src/kcmoduleproxy.cpp
196–197

Why emit changed?

Given KCModuleProxy mirrors KCModule API I would have expected a defaulted signal to match?

ervin added inline comments.Oct 30 2019, 12:29 PM
src/kcmoduleproxy.cpp
196–197

Because all the consumers I found surprisingly don't care about the distinction or the value of that bool. Also it would have led to more intrusive changes in said consumers. I admit I was surprised about that.

Edit: ah, I see why.

KCMMultiDialog and system settings re-evaluate the buttons on receipt of the changed signal
Still seems maybe a bit odd, but it makes sense in context.

Edit: ah, I see why.

KCMMultiDialog and system settings re-evaluate the buttons on receipt of the changed signal
Still seems maybe a bit odd, but it makes sense in context.

I don't disagree, it makes it look odd. I just didn't feel going for the even more intrusive route, I touched quite a few moving pieces already.

davidedmundson accepted this revision.Oct 30 2019, 12:53 PM
This revision is now accepted and ready to land.Oct 30 2019, 12:53 PM
ervin updated this revision to Diff 69270.Nov 4 2019, 1:56 PM

Add missing @since markers

This revision was automatically updated to reflect the committed changes.