<table><tr><td style="">bport added a comment.
</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/D27384">View Revision</a></tr></table><br /><div><div><p><a href="https://phabricator.kde.org/p/davidedmundson/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@davidedmundson</a> <br />
We have 2 bugs :</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">KCModuleQML apply button will stay disabled forever if at the end of load function need save is true (probably qml connection not yet done or something like that I guess, not yet found why) => We need to investigate on it too, I reproduced the same behavior with KCM icons by changing a setting at the end of load method.</li>
<li class="remarkup-list-item">In theory at the end of load we don't need to save data. However in some case for the font KCM data are dirty and need save. Came from Qt font comparison, if in your kdeglobals you have a font definition without style name, our algorithm to match a nearest font will add one, and font comparison between referential data and current data will return false because they are different.</li>
</ul>
<ul class="remarkup-list">
<li class="remarkup-list-item">My first approach was to fix algorithm to find the nearest font and keep style name empty if we don't have information. After this fix apply button work as expected, but when you adjust this font the selected style will be the first one on the list and not the one expected (regular)</li>
<li class="remarkup-list-item">Second approach by setting need save to false at the end of load allow us to be on the good state and the next change will allow us to enable apply button. By the way apply button will be enable directly because settings changed is trigered by another time after loading not sure where (didn't investigated yet)</li>
</ul>
<p>About KCModuleQML didn't investigate a lot but KCModule (parent class) emit a changed false on showEvent (the way the handle to set need save to false. On qml side we use directly stNeedsSave (you can look at save method implementation), so a proper fix can be to add "d->configModule->setNeedsSave(false);" after loading</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27384">https://phabricator.kde.org/D27384</a></div></div><br /><div><strong>To: </strong>bport, Plasma, broulik, ervin, crossi, meven, ngraham, davidedmundson, The-Feren-OS-Dev<br /><strong>Cc: </strong>The-Feren-OS-Dev, plasma-devel, Orage, LeGast00n, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>