Use modern KF5 plugin system
Review Request #129093 - Created Oct. 4, 2016 and submitted
This is a basic approach to use KF5's or Qt5's new plugin system to get rid of some deprecated KDE4 members.
Changes so far
- embed desktop files as json metadata inside plugin
KPluginLoader::findPlugins()instead of the old
- removed use of deprecated class
- removed use of deprecated macro
The following things could be done to further improve the code:
- convert desktop files permanently to the new json format
- cirkuit_backend.desktop could be dropped
kcoreaddons_add_plugin()instead of separate
install()commands in the CMakeLists.txt files
- build system will then also depend on json-file and trigger a build update if the metadata is changed
- simplify CMakeLists.txt
- move plugins to subdir inside of Qt5's plugin dir
KPluginLoader::findPlugins()will not have to scan all plugins
I also attached the changes as separate git formatted patches to this review.
Builds and installs fine for me. Plugins are all found and loaded.
I am new to KDE development and this reviewboard system. I really like using Cirkuit and just stumbled across the frameworks branch the other day.
Out of curiosity I checked out the code to see if it was already working and then started some coding to get rid of some of the deprecated warnings.
I hope this is appreciated and will help to make some progress with the port,
PS: I accidentally opened a pull request on Github as well. Right after submitting the request I found out that I should post it here...