Use modern KF5 plugin system

Review Request #129093 - Created Oct. 4, 2016 and submitted

Information
Kai Morwinski
cirkuit
frameworks
Reviewers
cirkuit

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
  • use KPluginLoader::findPlugins() instead of the old KService & KSycoca mechanism
  • removed use of deprecated class KPluginInfo
  • removed use of deprecated macro K_EXPORT_PLUGIN

Todo

The following things could be done to further improve the code:

  1. convert desktop files permanently to the new json format
  2. cirkuit_backend.desktop could be dropped
  3. use kcoreaddons_add_plugin() instead of separate add_library() and install() commands in the CMakeLists.txt files
  4. build system will then also depend on json-file and trigger a build update if the metadata is changed
  5. simplify CMakeLists.txt
  6. move plugins to subdir inside of Qt5's plugin dir
  7. 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.

Files


Kai Morwinski
Kai Morwinski
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit b2b77cda3f85e63310e240b10bf95ac365d19971 by Andreas Sturmlechner on behalf of Kai Morwinski to branch frameworks.
Loading...