Bug 441573 - Kid3 should separate state config from settings config
Summary: Kid3 should separate state config from settings config
Status: RESOLVED FIXED
Alias: None
Product: kid3
Classification: Applications
Component: general (other bugs)
Version First Reported In: 3.8.x
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Urs Fleisch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-26 13:59 UTC by Till Schäfer
Modified: 2021-10-04 10:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Till Schäfer 2021-08-26 13:59:02 UTC
Currently kid3 saves the application settings together with the application state (e.g. recently opened files/directories) in a single configuration file (~/.config/kid3rc here).
This causes the configurations to change frequently and make it hard to compare them, which is an issue when synchronizing settings, e.g. in a dotfile repository.

Therefore, I propose to separate application setting from application state. KConfig also provides a mechanism for this: KSharedConfig::openStateConfig (see https://api.kde.org/frameworks/kconfig/html/classKSharedConfig.html#a5dcfbe60478f169753342d37212c1b58 )

Observed states in kid3rc so far:
* Group Recent Files
* Group MainWindow


Operating System: Gentoo Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.12-gentoo (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4810MQ CPU @ 2.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 1 Till Schäfer 2021-08-26 14:02:36 UTC
More observed states in kid3rc:
* Group GUI
Comment 2 Urs Fleisch 2021-10-03 18:43:34 UTC
Git commit 0d268c09f48b7528f0351453942312de72d2b481 by Urs Fleisch.
Committed on 03/10/2021 at 18:42.
Pushed by ufleisch into branch 'master'.

KDE: Separate state config from settings config

The state of the KDE application is now saved in
~/.local/share/kid3/kid3staterc, the config file
~/.config/kid3rc should now only contain settings.

M  +6    -5    src/app/kde/kdemainwindow.cpp
M  +3    -3    src/app/kde/kdeplatformtools.cpp
M  +0    -3    src/app/kde/kdeplatformtools.h
M  +8    -4    src/app/kde/kdesettings.cpp
M  +7    -4    src/app/kde/kdesettings.h
M  +2    -2    src/app/qt/recentfilesmenu.cpp
M  +4    -0    src/core/config/batchimportconfig.cpp
M  +4    -0    src/core/config/exportconfig.cpp
M  +7    -3    src/core/config/fileconfig.cpp
M  +4    -0    src/core/config/filterconfig.cpp
M  +4    -0    src/core/config/findreplaceconfig.cpp
M  +27   -23   src/core/config/guiconfig.cpp
M  +13   -11   src/core/config/importconfig.cpp
M  +2    -1    src/core/config/isettings.h
M  +3    -1    src/core/config/kid3settings.cpp
M  +2    -1    src/core/config/kid3settings.h
M  +8    -4    src/core/config/mainwindowconfig.cpp
M  +4    -0    src/core/config/numbertracksconfig.cpp
M  +4    -0    src/core/config/playlistconfig.cpp
M  +4    -0    src/core/config/rendirconfig.cpp
M  +4    -0    src/core/config/serverimporterconfig.cpp
M  +3    -1    src/test/dummysettings.cpp
M  +2    -1    src/test/dummysettings.h

https://invent.kde.org/multimedia/kid3/commit/0d268c09f48b7528f0351453942312de72d2b481
Comment 3 Till Schäfer 2021-10-03 21:54:29 UTC
awesome, thank you a lot!
Comment 4 Till Schäfer 2021-10-04 10:12:52 UTC
fyi: tested the patch on top of version 3.8.7. -> works like a charm