KSettings in KF6
Open, Needs TriagePublic

Description

KCMUtils contains some classes in the KSettings namespace.

The most used one is KSettings::Dialog, which appears to be a container for multiple KCMs.
It is used in only a few places (Kontact, KTP, Choqok).
The API uses KPluginInfo.
If we consider it useful then we need to port it to KPluginMetaData.

There is also KSettings::PluginPage, which is a thin wrapper around PluginSelector. Deprecated with https://invent.kde.org/frameworks/kcmutils/-/merge_requests/20

There is also KSettings::Dispatcher, not sure whether it's useful to have

Related Objects

ervin moved this task from Needs Input to In Discussion on the KF6 board.Mar 28 2021, 2:33 PM
davidedmundson added a subscriber: davidedmundson.EditedMar 28 2021, 3:24 PM

PluginPage can be deprecated (and is already)

ComponentsDialog can be completely deleted. The header is not installed and it is not used by anyone else.

Dialog and Dispatcher are somewhat interlinked.

It is only used in only a few places, but it is used and valid.

If we keep it we need to port to KPluginInfo, but that would be relatively trivial.


Inside Dispatcher:

syncConfig is unused
componentNames is unused
configForComponentName is effectively unused

registerComponent is used
The API is very old school (char * slots)

...ultimately this just connects to void KCMultiDialog::configCommitted
which is public API of KCMultiDialog and therefore client code can be simplified to just connect to that?


DialogPrivate::createDialogFromServices

no .setdlg files exist, that can all die therefore the first half of this and parseGroupFile() can die

KPluginSelector then covers most remaining features. It would suffice for for Choqok at least.

Only Kontact /maybe/ needs this for the complicated page tree + selection?

ervin moved this task from In Discussion to Backlog on the KF6 board.Mar 28 2021, 3:30 PM
alex added a subscriber: alex.Jun 20 2021, 7:25 AM

Only Kontact /maybe/ needs this for the complicated page tree + selection?

Yes, I ported the usage in basket to use the normal KCMultiDialog. Choqok will need the same procedure, but that will have to wait for Tobias's port of KServiceTypeTrader,

My suggestion would be to wait for the Ahmad's port of KSettings::Dispatcher in Kontact, import the KSettings::Dialog in Kontact and then deprecate the class in kcmutils. Once that is done the next step would be to port the dialog away from the plugin loading using KPluginInfo. This should be relatively easy, because we don't need to keep BIC.

vkrause moved this task from Waiting on KF6 Branching to Done on the KF6 board.Jan 29 2023, 2:32 PM