[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    kaboutlicense api extension ::spdxId()?
From:       Harald Sitter <sitter () kde ! org>
Date:       2017-07-11 11:41:17
Message-ID: CAEc+18FkL6gwz9UWOftMj++mMpd-iWYVKvpjZ1mU2rNRCSnU3A () mail ! gmail ! com
[Download RAW message or body]

Hola

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/

(on a side node: it may be useful to switch our plugininfos to spdx
ids by default at some point in the future, our current format is not
only deficient in the lack of standardization but also doesn't cover
'and later' qualification at all)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic