D25140: kcm/fonts: set initial settings correctly
Bhushan Shah
noreply at phabricator.kde.org
Mon Nov 4 10:30:57 GMT 2019
bshah created this revision.
bshah added reviewers: Plasma, fvogt, davidedmundson.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
bshah requested review of this revision.
REVISION SUMMARY
During initial load we check if certain settings are set or not, and if
they are not set, we set it to rgb/slight (recommended settings by
Plasma team).
however state management of this is broken, previous flow was,
- try to get configuration
- if configuration is not available, set state to desired settings
- set original state to current state value(!)
- write configuration to the file once complete state is written (all other settings)
This is fine, when setting is changing from something other then none or
not-set. But if it is not-set, both original state and current state
ended up being desired settings, which write function would happily
ignore since it thinks config never changed.
So, if we encounter not-set configuration, preserve that as a original
setting to get configs written correctly.
This patch on it's own have no visible effect, kcm is still broken due
to lack of kcminit which writes correct configuration at startup, but
this is one of obvious bugfix for follow-up patch series.
TEST PLAN
with upcoming patch to add kcminit, it correctly applies rgb/slight
REPOSITORY
R119 Plasma Desktop
BRANCH
bshah/fonts
REVISION DETAIL
https://phabricator.kde.org/D25140
AFFECTED FILES
kcms/fonts/fonts.cpp
To: bshah, #plasma, fvogt, davidedmundson
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191104/1f973af4/attachment.html>
More information about the Plasma-devel
mailing list