Add API to control the disabled plugins
ClosedPublic

Authored by ervin on Oct 17 2017, 8:55 AM.

Details

Summary

We already had a way to control that list from the system settings
thanks to previous changes. Now this is also exposed via API.
Note however that the blacklist coming from the settings can't be
ignored, we control via the API only an extra blacklist sitting on top.

Also, on desktop platforms, the blacklist contains "saveasplugin" by
default.

Diff Detail

Repository
R495 Purpose Library
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 17 2017, 8:55 AM
aacid added inline comments.Oct 17 2017, 9:15 AM
src/alternativesmodel.h
49

Am I missing something or are we missing the implementation of this and the function below?

aacid added a comment.Oct 17 2017, 9:16 AM

BTW i'm still a bit unconvinced by s_defaultDisabledPlugins being different depending on the platform, but if Aleix is fine with that who am i to complain πŸ˜„

ervin added inline comments.Oct 17 2017, 9:44 AM
src/alternativesmodel.h
49

Woops, my bad, missed a clean up...

ervin updated this revision to Diff 20897.Oct 17 2017, 9:45 AM

Address aacid's comment

apol added inline comments.Oct 18 2017, 9:58 AM
src/alternativesmodel.cpp
42

Let's leave this static without ifdef for now. As soon as we start using Purpose properly on mobile devices let's revisit this.

apol added a comment.Oct 18 2017, 10:00 AM

Other than that, LGTM.

autotests/alternativesmodeltest.cpp
185

You want to verify saveasplugin no?

ervin marked an inline comment as done.Oct 18 2017, 11:01 AM
ervin added inline comments.
autotests/alternativesmodeltest.cpp
185

No, it's intentional.

kdeconnectplugin is the one under test, it's just checking that a list with something else wouldn't accidentally blacklist it.

ervin updated this revision to Diff 20938.Oct 18 2017, 11:02 AM

Addresses apol's comment

apol accepted this revision.Oct 18 2017, 1:28 PM
This revision is now accepted and ready to land.Oct 18 2017, 1:28 PM
This revision was automatically updated to reflect the committed changes.