<table><tr><td style="">sitter created this revision.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: Frameworks.
</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/D6672" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>External software (e.g. appstream) uses the standardized SPDX license<br />
identifiers. Seeing as they are specified and ours are not it is useful to<br />
have a quick way to convert our licenses to SPDX notation.</p>
<p>To also preserve 'this version or later versions' notations properly so<br />
we can reflect them into SPDX there now is an orLater bool which tracks<br />
the qualification. The qualification is both for us and for SPDX denoted<br />
as a trailing plus sign. To that end we'll infer that input keywords with<br />
a trailing plus sign are orLater. For code-constructed licenses via<br />
kAboutData.addLicense() there is a new explicit parameter orLater to<br />
qualify the license. The param defaults to false to retain backwards<br />
compatibility.<br />
Constructing KAboutData with orLater set is not supported as the param list<br />
is long enough.</p>
<p>::spdx() returns expressions. Right now they are simple ones (because we<br />
actually do not support anything more involved from a KAboutLicense POV)<br />
such as 'GPL-2.0+'. In the future this can easily be<br />
'GPL-2.0+ WITH excpetion' though if we decide to support that.</p>
<p>Private::spdxID() is internally used to translate our enum key to the<br />
well-known identifier used by SPDX. It does not construct an expression.</p>
<p>CHANGELOG: New spdx API on KAboutLicense to get SPDX license expressions</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">new test passes</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></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/D6672" rel="noreferrer">https://phabricator.kde.org/D6672</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/kaboutdatatest.cpp<br />
src/lib/kaboutdata.cpp<br />
src/lib/kaboutdata.h</div></div></div><br /><div><strong>To: </strong>sitter, sebas<br /><strong>Cc: </strong>Frameworks<br /></div>