D28221: Don't write default value to configuration file when default value came from /etc/* file

Benjamin Port noreply at phabricator.kde.org
Mon Mar 30 10:14:05 BST 2020


bport added a comment.


  > !hasDefault() checks [system config files] and therefore should stay. Otherwise, when the situation is C++=1 system=2 and value to be written is 1 you'll revert() i.e. not write anything and then re-read 2, oops.
  >  Sounds like you should add a unittest for this case, to detect this regression...
  
  I added an unittest to be sure I test the regression (let me know if I don't test what you had in mind). However no code changes are needed because in this case mReference and mDefault are different (mDefault will be equal to the value from system file)

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D28221

To: bport, ervin, dfaure, davidedmundson
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200330/851ea1a1/attachment.html>


More information about the Kde-frameworks-devel mailing list