[kcmkwin/kwindesktop] Use PackageLoader to get effect metadata
ClosedPublic

Authored by zzag on Jul 2 2018, 3:02 PM.

Details

Summary

KPluginInfo(KService::Ptr) is deprecated in favor of using plugin
loaders.

Test Plan
  • Go to System Settins -> Desktop Behavior > Virtual Desktops
  • Open Switching tab
  • Select Fade desktop
  • Click the info button

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Jul 2 2018, 3:02 PM
Restricted Application added a project: KWin. · View Herald TranscriptJul 2 2018, 3:02 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jul 2 2018, 3:02 PM

For scripted effects, yes, they're packages
For a 3rd party C++ plugin effects with a matching .desktop file and this will no longer have the right data.

Kwin in the general case supports both.

Right now showDialog is only used in the case where the list is hardcoded anyway, but that could change.

Give me a bit to work out what's right.

zzag added a comment.Jul 2 2018, 4:14 PM

For scripted effects, yes, they're packages
For a 3rd party C++ plugin effects with a matching .desktop file and this will no longer have the right data.

Metadata should be built in. I.e. for 3rd party C++ effects metadata is obtained through KPluginLoader.
Virtual desktops KCM doesn't support 3rd party C++ effects. Effects that animate switching between virtual desktops are hard coded all the way down.

Kwin in the general case supports both.
Right now showDialog is only used in the case where the list is hardcoded anyway, but that could change.

It would be great. :-)

Give me a bit to work out what's right.

Sure.

davidedmundson accepted this revision.Jul 6 2018, 10:54 AM

Meh I still don't understand why KPluginInfo(KService) is deprecated it makes no sense, given using KService for plugins is not yet deprecated.

In any case the correct future thing to do would be for us to drop KService and use KPackageLoader directly for scripted effects and KPluginLoader directly for binary effects.
This is part of that. Ship it.

This revision is now accepted and ready to land.Jul 6 2018, 10:54 AM
This revision was automatically updated to reflect the committed changes.