kaboutlicense api extension ::spdxId()?

Harald Sitter sitter at kde.org
Thu Jul 13 10:01:49 UTC 2017


On Tue, Jul 11, 2017 at 2:17 PM, Sebastian Kügler <sebas at kde.org> wrote:
> On dinsdag 11 juli 2017 13:41:17 CEST Harald Sitter wrote:
>> I was wondering if anyone had an opinion on extending kaboutlicense
>> with a ::spdxId() instance method returning the license's spdx id [1].
>>
>> Use case at hand is kpackagetool, which maps X-KDE-PluginInfo-License
>> of (e.g.) plasma applets to appstream metadata. Appstream however uses
>> the standardized spdx identifiers so we need a conversion table
>> somewhere. And here I am thinking why not kaboutlicense itself.
>>
>> QString KAboutLicense::spdxId() const
>> {
>>     switch (d->_licenseKey) {
>>     case KAboutLicense::File:
>>         return QStringLiteral("");
>>     case KAboutLicense::GPL_V2:
>>         return QStringLiteral("GPL-2.0");
>>    ...
>> }
>>
>> [1] https://spdx.org/licenses/
>
> This would make sense and allow 3rd party tools using SPDX keys to make sense
> of X-KDE-PluginInfo-License keys, indeed. I think it's useful.

https://phabricator.kde.org/D6672


More information about the Kde-frameworks-devel mailing list