Bug 451869

Summary: KAboutData does not correctly indicate that later versions of the license can be used
Product: [Frameworks and Libraries] frameworks-kcoreaddons Reporter: Soren Stoutner <soren>
Component: generalAssignee: Michael Pyne <mpyne>
Status: REPORTED ---    
Severity: minor CC: a.samirh78, kdelibs-bugs, sitter, soren
Priority: NOR    
Version: 5.106.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Soren Stoutner 2022-03-24 21:31:03 UTC
`KAboutData::setLicense()` has an overloaded constructor that allows specifying `KAboutLicense::OrLaterVersions`.  However, specifying this does nothing, and the interface is the same as if it is not specified.

For example, `setLicense(KAboutLicense::GPL_V3)` display the following text in the About dialog:

"License: GNU General Public License Version 3"

`setLicense(KAboutLicense::GPL_V3, KAboutLicense::OrLaterVersion)` displays the same text, where it should display something like:

"License: GNU General Public License Version 3 or later version"

Similarly, clicking on the license to display the full text shows the same thing for both, where the second should specify that a later version of the license may be used.
Comment 1 Ahmad Samir 2022-05-05 22:32:05 UTC
I guess you're talking about the "About AppName" action in the Help menu? that uses KAbstractAboutDialog[1], which uses KAboutLicense::name() to get the label ("License: ...") to show in the dialogue, and KLicenseDialog (the dialogue that shows the actual license text), which uses KAboutLicense::text().

Neither name() nor text() consider KAboutLicense::OrLaterVersion; the latter seems to affect the return value of KAboutLicense::spdx()

[1]https://invent.kde.org/frameworks/kxmlgui/-/blob/master/src/kabstractaboutdialog_p.cpp#L84
Comment 2 Harald Sitter 2022-05-06 12:27:33 UTC
Last I checked the enum values were a shambles and I've concluded that the API needs reinventing to instead base on spdx input and output. Everything else is awkwardly inflexible .
Comment 3 Ahmad Samir 2022-05-06 13:04:08 UTC
I think we should update the API docs so that it's clear the OrLater option only concerns the spdx() method(s).