<table><tr><td style="">bshah created this revision.<br />bshah added reviewers: Plasma, fvogt, davidedmundson.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />bshah requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D25140">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>During initial load we check if certain settings are set or not, and if<br />
they are not set, we set it to rgb/slight (recommended settings by<br />
Plasma team).</p>
<p>however state management of this is broken, previous flow was,</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">try to get configuration</li>
<li class="remarkup-list-item">if configuration is not available, set state to desired settings</li>
<li class="remarkup-list-item">set original state to current state value(!)</li>
<li class="remarkup-list-item">write configuration to the file once complete state is written (all other settings)</li>
</ul>
<p>This is fine, when setting is changing from something other then none or<br />
not-set. But if it is not-set, both original state and current state<br />
ended up being desired settings, which write function would happily<br />
ignore since it thinks config never changed.</p>
<p>So, if we encounter not-set configuration, preserve that as a original<br />
setting to get configs written correctly.</p>
<p>This patch on it's own have no visible effect, kcm is still broken due<br />
to lack of kcminit which writes correct configuration at startup, but<br />
this is one of obvious bugfix for follow-up patch series.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>with upcoming patch to add kcminit, it correctly applies rgb/slight</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>BRANCH</strong><div><div>bshah/fonts</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D25140">https://phabricator.kde.org/D25140</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcms/fonts/fonts.cpp</div></div></div><br /><div><strong>To: </strong>bshah, Plasma, fvogt, davidedmundson<br /><strong>Cc: </strong>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<br /></div>