[Config] Remove KDE4 config support, stop writing arbitrary config files
ClosedPublic

Authored by bruns on Oct 23 2018, 7:54 PM.

Details

Summary

The KDE4 baloofilerc was only used by dolphin in the KDE4 migration
phase and is no longer needed.

In case a baloofilerc in the legacy location does not exist, the effect
is even worse - the KConfig is instantiated with an empty path, and the
config file name is derived from the application name. This leads to
adding a "[General]" section in e.g. kcmshell5rc or systemsettingsrc.

Also see T9897.

Test Plan

modify config using balooctl config {add,rm} or using SystemSettings
-> .config/baloorc resp. .config/systemsettingsrc is no longer written,
only .config/baloofilerc.

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Oct 23 2018, 7:54 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptOct 23 2018, 7:54 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Oct 23 2018, 7:54 PM
bruns edited the summary of this revision. (Show Details)Oct 23 2018, 7:57 PM

Looks good, but what's our transition plan? Does this need any special handling for people who already have old config files?

Looks good, but what's our transition plan? Does this need any special handling for people who already have old config files?

Currently, there is some garbage left in a few config files (potentially any application which writes some baloo config keys), on my system:

balooctl: ~/.config/baloorc
systemsettings/search: ~/.config/kcmshell5rc, ~/.config/systemsettingsrc

I am not aware of any bad side effects having these garbage entries. baloo itself (or any of its library functions) newer read these keys from
the mentioned files, only from ~/.config/baloofilerc.

Adding cleanup code is of course possible, but this code:

  • has to be run at an appropriate time (each config read? write? session start?)
  • has to parse the config (at least systemsettingsrc is quite large)
  • is extra code which has to be maintained

As this change is an improvement even without the cleanup, I would postpone the cleanup.

ngraham accepted this revision.Oct 24 2018, 6:53 PM

Fair enough, that's true. Go for it!

This revision is now accepted and ready to land.Oct 24 2018, 6:53 PM
This revision was automatically updated to reflect the committed changes.