D6672: add KAboutLicense::spdx and introduce orLater qualification

Harald Sitter noreply at phabricator.kde.org
Thu Jul 13 09:51:43 UTC 2017


sitter created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  External software (e.g. appstream) uses the standardized SPDX license
  identifiers. Seeing as they are specified and ours are not it is useful to
  have a quick way to convert our licenses to SPDX notation.
  
  To also preserve 'this version or later versions' notations properly so
  we can reflect them into SPDX there now is an orLater bool which tracks
  the qualification. The qualification is both for us and for SPDX denoted
  as a trailing plus sign. To that end we'll infer that input keywords with
  a trailing plus sign are orLater. For code-constructed licenses via
  kAboutData.addLicense() there is a new explicit parameter orLater to
  qualify the license. The param defaults to false to retain backwards
  compatibility.
  Constructing KAboutData with orLater set is not supported as the param list
  is long enough.
  
  ::spdx() returns expressions. Right now they are simple ones (because we
  actually do not support anything more involved from a KAboutLicense POV)
  such as 'GPL-2.0+'. In the future this can easily be
  'GPL-2.0+ WITH excpetion' though if we decide to support that.
  
  Private::spdxID() is internally used to translate our enum key to the
  well-known identifier used by SPDX. It does not construct an expression.
  
  CHANGELOG: New spdx API on KAboutLicense to get SPDX license expressions

TEST PLAN
  - new test passes

REPOSITORY
  R244 KCoreAddons

BRANCH
  master

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

AFFECTED FILES
  autotests/kaboutdatatest.cpp
  src/lib/kaboutdata.cpp
  src/lib/kaboutdata.h

To: sitter, sebas
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170713/51c88cbb/attachment.html>


More information about the Kde-frameworks-devel mailing list