Currently apps that want to use static plugins have to implement their own code paths for it. Integrating this in the KCoreAddons classes that handle plugins would make this process much easier. I already played around with writing the plugin namespace in the moc metadata, which one could read in the findPlugins and findPluginById method.
Some questions that might need discussion:
- Do we want this to be switchable? So that the project can set a default to build the plugins statically in release builds, but developers can build them dynamically. This way one would not need to recompile the app in case changes to plugins are made. @vkrause Mentioned that this would be useful for Android deployments.
- Should the existing static plugins be migrated to KPluginFactory? In kwin the static plugins don't use this, otherwise making them compatible with dynamic plugins will be a bit tricky/hacky. @zzag