KConfigXt for KF6
Open, Needs TriagePublic

Description

Some general thoughts about the kcfgc file:

  • ForceStringFilename is unused with me having ported the only usage in killbots, so it should get deprecated
  • SourceExtension this seems completely pointless to me, because the file gets automatically added to the target or list
  • HeaderExtension I honestly don't think it is worth having an option for the file extension of a generated header. Only okteta makes use of it
  • The File parameter seems redundant, we could just derive it from the file name

With the last 3 issues resolved we could also drop the parsing of the kcfgc file in cmake and avoid re-configuring of the project whenever anything in the file changes.

The kcfgfile "arg" attribute in combination with the singelton seems off. When looking at the usages kwin the values are set to the build-time configured ones. Being able to set those automatically in cmake would be a cleaner approach IMHO. Also I think it would make sense to offer an optional param in the constructor if no filename is explicitly set.

alex created this task.Sep 24 2021, 7:59 PM

I agree with all points.
mind that I have created my own parser for a slimmed down version of KConfig because I did not want to deal with most of the intrinsics of kconfigxt.

other things:

  • the default parameter for a value is impossible to be queried in runtime using the exposed api
  • there are no groups, even if the xml declares groups. those are just for the configuration file, not for the api. (i expect to be able to do things like prefs.windows.palette.color and not prefs.window_palette_color)
  • remove some options (signals vs no-signals?)
  • remove the enum based magic (it's impossible to have too many values on the configuration file because of this, I had to split a settings into 4 files for a kcm because of the amount of configuration)
  • kill name and key, use only one (and port the settings that need porting with the settings updater)
alex added a comment.Sep 24 2021, 8:29 PM

remove the enum based magic

Could you please elaborate what enum based magic specifically?

I had to split a settings into 4 files for a kcm because of the amount of configuration)

What KCM specifically?

In T14895#263909, @alex wrote:

remove the enum based magic

Could you please elaborate what enum based magic specifically?

For each element on the settings, there's a corresponding enum.
that limits the number of settings one can add to the xml file.

I had to split a settings into 4 files for a kcm because of the amount of configuration)

What KCM specifically?

Acessibility.

alex moved this task from Backlog to Metatasks on the KF6 board.Nov 19 2021, 7:05 PM