Get rid of KCModuleInfo
Open, Needs TriagePublic

Description

The API is based around KPluginInfo, which we are trying to get rid of. Also it is not compatible with KPluginMetaData. Considering that there is no strong need for porting it we should get rid of it.

Suggested plan of action:

  • Make sure KPluginMetaData::fromDesktopFile works with the KPluginMetaData loading overload. This way consumers can more easily port to the it.
  • (Hopefully make systemsettings and kcmshell utilize this stuff soon after)
  • Read X-KDE-Weight property in initialPreference property in KPluginMetaData. This way we can simplify sorting the KCMs.
  • Deprecate KCModuleInfo usages in KCMUtils API
  • Deprecate KCModuleInfo entirely

Related Objects

StatusAssignedTask
OpenNone
Openalex
alex created this task.Sep 8 2021, 7:00 PM
alex added a subscriber: crossi.Sep 12 2021, 6:42 AM

Not sure if KCModuleLoader::isDefaults needs a replacement, it is just loading the plugin & calling KCModuleData::isDefaults().

Also it only seems to be used in systemsettings, consequently calling the stuff there manually seems fine IMHO.

cc @crossi Who wrote the initial API

crossi added a subscriber: bport.Sep 22 2021, 9:33 AM
In T14860#263323, @alex wrote:

Not sure if KCModuleLoader::isDefaults needs a replacement, it is just loading the plugin & calling KCModuleData::isDefaults().

Also it only seems to be used in systemsettings, consequently calling the stuff there manually seems fine IMHO.

Initialy with @bport we added this method to do the loading and calling isDefaults(), then we added the ability to query isDefaults() asynchronously, so the code to load a module was moved outside this method to a new method KCModuleLoader::loadModuleData.

Since It is called only in one place, and KCModuleLoader::loadModuleData is already used in SystemSettings, so no objection to remove KCModuleLoader::isDefaults from the API and move the code into MenuItem::updateDefaultIndicator()

All of the public API that uses it got deprecated with https://invent.kde.org/frameworks/kcmutils/-/merge_requests/64

Systemsettings has been ported to the KPluginmetaData overloads.

alex claimed this task.Feb 7 2023, 8:23 AM
alex moved this task from Waiting on KF6 Branching to Done on the KF6 board.