<table><tr><td style="">sitter updated this revision to Diff 55338.<br />sitter 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/D20092">View Revision</a></tr></table><br /><div><div><ul class="remarkup-list">
<li class="remarkup-list-item">defaultFilePath is now static in the cpp only, the public ctor defaults to QString() for the filePath, which gets checked in the private ctor and diverted to defaultFilePath if necessary</li>
<li class="remarkup-list-item">Private ctor now copies filePath as we may need to change it to defaultFilePath</li>
<li class="remarkup-list-item">= and \# parsing revisitede<ul class="remarkup-list">
<li class="remarkup-list-item">new helper splitEntry mids the line at first = character only preventing = characters in pretty strings from tripping up the parsing</li>
<li class="remarkup-list-item">\# characters that are not the first character in the line are now not explicitly causing a line skip as far as entry parsing is concerned. I think this is actually a more truthful implementation of the format specification. since the spec doesn't even mention trailing \# we can do whatever with them and not skipping entire lines outright seems like the nicer solution here</li>
</ul></li>
<li class="remarkup-list-item">api docs updated accordingly. now clearly states that trailing comments result in undefined behavior</li>
<li class="remarkup-list-item">test and fixture updated to make sure = and \# work in pretty string and that completely invalid lines are skipped</li>
<li class="remarkup-list-item">parsing skips now produce categorized warnings</li>
</ul>

<p>I am wondering if from an API POV it'd be nicer if we maybe had two ctors (one default, one with QString) so we can let initalizer lists handle whether the defaults apply or not.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D20092?vs=54993&id=55338">https://phabricator.kde.org/D20092?vs=54993&id=55338</a></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D20092">https://phabricator.kde.org/D20092</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/CMakeLists.txt<br />
autotests/data/os-release<br />
autotests/kosreleasetest.cpp<br />
src/lib/CMakeLists.txt<br />
src/lib/util/kosrelease.cpp<br />
src/lib/util/kosrelease.h</div></div></div><br /><div><strong>To: </strong>sitter, apol, mpyne<br /><strong>Cc: </strong>davidedmundson, pino, aacid, mpyne, kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>