Currently the KCMs are queried using KServiceTypeTrader, which we are trying to get rid of. It also forces the consumers to install the old desktop file, instead of just using embedded JSON metadata.
Some thoughts on this (brainstoming ;)):
- We could set the type for the desktop file to application and combine this with OnlyShowIn=KDE, then one could use KApplicationTrader to query the KCMs. That makes sense considering that the KCMs which you can open from KRunner & the app launcher are treated like application.
- Alternatively one could make KSycoca index the JSON plugins, at least for a specific namespaces. Then we would not need to install the desktop files at all. To provide a query mechanism the type could be set to application, as suggested above.
- Make the consumers parse the JSON plugins using KPluginLoader. This would have the disadvantage that the launching could not be done using a simple ApplicationLauncherJob