Bug 474957

Summary: Changing look-and-feel doesn't clear kdedefaults values from old look and feel if not present in new one
Product: [Applications] systemsettings Reporter: Nicolas Fella <nicolas.fella>
Component: kcm_lookandfeelAssignee: Plasma Bugs List <plasma-bugs>
Status: ASSIGNED ---    
Severity: normal CC: bugseforuns, kde, nate
Priority: NOR    
Version First Reported In: 5.27.8   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicolas Fella 2023-09-27 23:00:17 UTC
STEPS TO REPRODUCE
1.  Apply some look-and-feel with some default config key in its defaults file
2. Apply another look-and-feel that does *not* have the same key in its defaults file

OBSERVED RESULT
The config value of the old LnF is still present in .config/kdedefaults

EXPECTED RESULT
The value is not present in .config/kdedefaults since the current LnF doesn't specify it

SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 6.6

ADDITIONAL INFORMATION
A related concrete example: In Plasma 5.27 the default LnF had 

[kwinrc][WindowSwitcher]
LayoutName=org.kde.breeze.desktop

in its defaults file. However that was removed in https://invent.kde.org/plasma/plasma-workspace/-/commit/e7bd1c29b29446665f50804fedb9a02312f4af53

After upgrading from 5.27 to 6 .config/kdedefaults/kwinrc still has the value set
Comment 1 Nate Graham 2023-09-28 20:35:57 UTC
Present in Plasma 5 too.
Comment 2 Bug Janitor Service 2023-09-29 00:09:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3345
Comment 3 Nate Graham 2024-01-10 20:23:11 UTC
*** Bug 476958 has been marked as a duplicate of this bug. ***