Skip to content

KCModuleProxy: Use std::optional to check if we have a KPluginMetaData object

Alexander Lohnau requested to merge work/optional_internal_api into master

For KCMs that are loaded as part of a KPluginSelector/KPluginWidget we don't need json metadata.

For plugins that are dynamically loaded we insert a dummy json object, but in case of static plugins we do not have an overload to do so. Meaning consumers are forced to provide json metadata for the plugin to be considered valid. See https://phabricator.kde.org/T15094 which will provide a more universal way of handling it.

With kcoreaddons!178 (merged) we also get a useful error message when we try to load a plugin by name which does not exist. Without this change we would say, that the desktop file could not be found.

Edited by Alexander Lohnau

Merge request reports