KCoreAddons
kaboutdata.cpp
109 KAboutLicensePrivate(KAboutLicense::LicenseKey licenseType, KAboutLicense::VersionRestriction versionRestriction, const KAboutData *aboutData);
188KAboutLicense::KAboutLicense(LicenseKey licenseType, VersionRestriction versionRestriction, const KAboutData *aboutData)
231 && (d->_licenseKey == KAboutLicense::BSD_2_Clause || d->_licenseKey == KAboutLicense::BSD_3_Clause || d->_licenseKey == KAboutLicense::MIT
282 result += QCoreApplication::translate("KAboutLicense", "This program is distributed under the terms of the %1.").arg(name(KAboutLicense::ShortName))
284 + QCoreApplication::translate("KAboutLicense", "You can find the full term <a href=\"https://spdx.org/licenses/%1.html\">the SPDX website</a>")
303 result += QCoreApplication::translate("KAboutLicense", "This program is distributed under the terms of the %1.").arg(name(KAboutLicense::ShortName));
347 licenseShort = QCoreApplication::translate("KAboutLicense", "GPL v2", "@item license (short name)");
348 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU General Public License Version 2", "@item license");
351 licenseShort = QCoreApplication::translate("KAboutLicense", "LGPL v2", "@item license (short name)");
352 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU Lesser General Public License Version 2", "@item license");
355 licenseShort = QCoreApplication::translate("KAboutLicense", "BSD License", "@item license (short name)");
359 licenseShort = QCoreApplication::translate("KAboutLicense", "Artistic License", "@item license (short name)");
360 licenseFull = QCoreApplication::translate("KAboutLicense", "Artistic License", "@item license");
363 licenseShort = QCoreApplication::translate("KAboutLicense", "GPL v3", "@item license (short name)");
364 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU General Public License Version 3", "@item license");
367 licenseShort = QCoreApplication::translate("KAboutLicense", "LGPL v3", "@item license (short name)");
368 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU Lesser General Public License Version 3", "@item license");
371 licenseShort = QCoreApplication::translate("KAboutLicense", "LGPL v2.1", "@item license (short name)");
372 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU Lesser General Public License Version 2.1", "@item license");
375 licenseShort = QCoreApplication::translate("KAboutLicense", "MIT License", "@item license (short name)");
379 licenseShort = QCoreApplication::translate("KAboutLicense", "CC0", "@item license (short name)");
380 licenseFull = QCoreApplication::translate("KAboutLicense", "Creative Commons Zero", "@item license");
383 licenseShort = QCoreApplication::translate("KAboutLicense", "ODbL v1.0", "@item license (short name)");
384 licenseFull = QCoreApplication::translate("KAboutLicense", "Open Data Commons Open Database License v1.0", "@item license");
387 licenseShort = QCoreApplication::translate("KAboutLicense", "Apache 2.0", "@item license (short name)");
388 licenseFull = QCoreApplication::translate("KAboutLicense", "Apache License 2.0", "@item license");
391 licenseShort = QCoreApplication::translate("KAboutLicense", "FTL", "@item license (short name)");
392 licenseFull = QCoreApplication::translate("KAboutLicense", "Freetype Project License", "@item license");
395 licenseShort = QCoreApplication::translate("KAboutLicense", "Boost License", "@item license (short name)");
396 licenseFull = QCoreApplication::translate("KAboutLicense", "Boost Software License 1.0", "@item license");
399 licenseShort = QCoreApplication::translate("KAboutLicense", "BSD-3-Clause", "@item license (short name)");
400 licenseFull = QCoreApplication::translate("KAboutLicense", "BSD 3-Clause \"New\" or \"Revised\" License", "@item license");
402 licenseShort = QCoreApplication::translate("KAboutLicense", "MPL 2.0", "@item license (short name)");
403 licenseFull = QCoreApplication::translate("KAboutLicense", "Mozilla Public License 2.0", "@item license");
408 licenseShort = licenseFull = QCoreApplication::translate("KAboutLicense", "Custom", "@item license");
411 licenseShort = licenseFull = QCoreApplication::translate("KAboutLicense", "Not specified", "@item license");
567 static QList<KAboutPerson> parseTranslators(const QString &translatorName, const QString &translatorEmail);
625KAboutData::KAboutData(const QString &_componentName, const QString &_displayName, const QString &_version)
673KAboutData &KAboutData::addAuthor(const QString &name, const QString &task, const QString &emailAddress, const QString &webAddress, const QUrl &avatarUrl)
691KAboutData &KAboutData::addCredit(const QString &name, const QString &task, const QString &emailAddress, const QString &webAddress, const QUrl &avatarUrl)
720KAboutData::addComponent(const QString &name, const QString &description, const QString &version, const QString &webAddress, const QString &pathToLicenseFile)
722 d->_componentList.append(KAboutComponent(name, description, version, webAddress, pathToLicenseFile));
799KAboutData &KAboutData::setLicense(KAboutLicense::LicenseKey licenseKey, KAboutLicense::VersionRestriction versionRestriction)
810KAboutData &KAboutData::addLicense(KAboutLicense::LicenseKey licenseKey, KAboutLicense::VersionRestriction versionRestriction)
954QList<KAboutPerson> KAboutDataPrivate::parseTranslators(const QString &translatorName, const QString &translatorEmail)
960 // use list of string views to delay creating new QString instances after the white-space trimming
1106void warnIfOutOfSync(const char *aboutDataString, const QString &aboutDataValue, const char *appDataString, const QString &appDataValue)
1109 qCWarning(KABOUTDATA) << appDataString << appDataValue << "is out-of-sync with" << aboutDataString << aboutDataValue;
1125 // Unset the default (KDE) bug address, this is likely a third-party app. https://bugs.kde.org/show_bug.cgi?id=473517
1192 qCWarning(KABOUTDATA) << "Could not initialize the equivalent properties of Q*Application: no instance (yet) existing.";
1226 return parser->addOption(QCommandLineOption(QStringLiteral("author"), QCoreApplication::translate("KAboutData CLI", "Show author information.")))
1227 && parser->addOption(QCommandLineOption(QStringLiteral("license"), QCoreApplication::translate("KAboutData CLI", "Show license information.")))
1229 QCoreApplication::translate("KAboutData CLI", "The base file name of the desktop entry for this application."),
1240 qPrintable(QCoreApplication::translate("KAboutData CLI", "This application was written by somebody who wants to remain anonymous.")));
1242 printf("%s\n", qPrintable(QCoreApplication::translate("KAboutData CLI", "%1 was written by:").arg(qAppName())));
1253 printf("%s\n", qPrintable(QCoreApplication::translate("KAboutData CLI", "Please use https://bugs.kde.org to report bugs.")));
1255 printf("%s\n", qPrintable(QCoreApplication::translate("KAboutData CLI", "Please report bugs to %1.").arg(bugAddress())));
This class is used to store information about a third party component.
Definition kaboutdata.h:391
KAboutComponent & operator=(const KAboutComponent &other)
Assignment operator.
KAboutComponent(const QString &name=QString(), const QString &description=QString(), const QString &version=QString(), const QString &webAddress=QString(), enum KAboutLicense::LicenseKey licenseType=KAboutLicense::Unknown)
Convenience constructor.
Definition kaboutdata.cpp:475
This class is used to store information about a program or plugin.
Definition kaboutdata.h:558
KAboutData & setProductName(const QByteArray &name)
Defines the product name which will be used in the KBugReport dialog.
Definition kaboutdata.cpp:852
KAboutData & setLicenseText(const QString &license)
Defines a license text, which is translated.
Definition kaboutdata.cpp:726
KAboutData & setShortDescription(const QString &shortDescription)
Defines a short description of what the program does.
Definition kaboutdata.cpp:788
KAboutData & setHomepage(const QString &homepage)
Defines the program homepage.
Definition kaboutdata.cpp:834
KAboutData & setDesktopFileName(const QString &desktopFileName)
Sets the base name of the desktop entry for this application.
Definition kaboutdata.cpp:1056
static QString aboutTranslationTeam()
Returns a message about the translation team.
Definition kaboutdata.cpp:991
KAboutData & addLicense(KAboutLicense::LicenseKey licenseKey)
Adds a license identifier.
Definition kaboutdata.cpp:805
KAboutData & setLicenseTextFile(const QString &file)
Defines a license text by pointing to a file where it resides.
Definition kaboutdata.cpp:748
const char * internalProductName() const
Definition kaboutdata.cpp:871
QString customAuthorRichText() const
Returns the rich text displayed around the list of authors instead of the default message telling use...
Definition kaboutdata.cpp:1026
KAboutData & setCopyrightStatement(const QString ©rightStatement)
Defines the copyright statement to show when displaying the license.
Definition kaboutdata.cpp:822
KAboutData & addComponent(const KAboutComponent &component)
Add a component that is used by the application.
Definition kaboutdata.cpp:703
bool customAuthorTextEnabled() const
Returns whether custom text should be displayed around the list of authors.
Definition kaboutdata.cpp:1031
const char * internalProgramName() const
Definition kaboutdata.cpp:884
KAboutData & setProgramLogo(const QVariant &image)
Defines the program logo.
Definition kaboutdata.cpp:894
QString customAuthorPlainText() const
Returns the plain text displayed around the list of authors instead of the default message telling us...
Definition kaboutdata.cpp:1021
KAboutData & setBugAddress(const QByteArray &bugAddress)
Defines the address where bug reports should be sent.
Definition kaboutdata.cpp:840
KAboutData & setTranslator(const QString &name, const QString &emailAddress)
Sets the name(s) of the translator(s) of the GUI.
Definition kaboutdata.cpp:697
KAboutData & addCredit(const KAboutPerson &person)
Add a person that deserves credit.
Definition kaboutdata.cpp:685
QString organizationDomain() const
Returns the domain name of the organization that wrote this application.
Definition kaboutdata.cpp:928
KAboutData & addLicenseText(const QString &license)
Adds a license text, which is translated.
Definition kaboutdata.cpp:733
KAboutData & setDisplayName(const QString &displayName)
Defines the displayable component name string.
Definition kaboutdata.cpp:775
static void setApplicationData(const KAboutData &aboutData)
Sets the application data for this application.
Definition kaboutdata.cpp:1172
KAboutData & setVersion(const QByteArray &version)
Defines the program version string.
Definition kaboutdata.cpp:782
KAboutData & setOtherText(const QString &otherText)
Defines the additional text to show in the about dialog.
Definition kaboutdata.cpp:828
KAboutData & setCustomAuthorText(const QString &plainText, const QString &richText)
Sets the custom text displayed around the list of authors instead of the default message telling user...
Definition kaboutdata.cpp:1036
KAboutData & setOrganizationDomain(const QByteArray &domain)
Defines the domain of the organization that wrote this application.
Definition kaboutdata.cpp:846
KAboutData(const QString &componentName, const QString &displayName, const QString &version, const QString &shortDescription, enum KAboutLicense::LicenseKey licenseType, const QString ©rightStatement=QString(), const QString &otherText=QString(), const QString &homePageAddress=QString(), const QString &bugAddress=QStringLiteral("submit@bugs.kde.org"))
Constructor.
Definition kaboutdata.cpp:570
void processCommandLine(QCommandLineParser *parser)
Reads the processed parser and sees if any of the arguments are the ones set up from setupCommandLine...
Definition kaboutdata.cpp:1233
KAboutData & unsetCustomAuthorText()
Clears any custom text displayed around the list of authors and falls back to the default message tel...
Definition kaboutdata.cpp:1046
KAboutData & addLicenseTextFile(const QString &file)
Adds a license text by pointing to a file where it resides.
Definition kaboutdata.cpp:755
KAboutData & setLicense(KAboutLicense::LicenseKey licenseKey)
Defines the license identifier.
Definition kaboutdata.cpp:794
static KAboutData applicationData()
Returns the KAboutData for the application.
Definition kaboutdata.cpp:1115
bool setupCommandLine(QCommandLineParser *parser)
Configures the parser command line parser to provide an authors entry with information about the deve...
Definition kaboutdata.cpp:1213
KAboutData & setComponentName(const QString &componentName)
Defines the component name used internally.
Definition kaboutdata.cpp:769
LicenseKey
Describes the license of the software; for more information see: https://spdx.org/licenses/.
Definition kaboutdata.h:200
@ BSD_2_Clause
BSD_2_CLAUSE, see https://spdx.org/licenses/BSD-2-Clause.html.
Definition kaboutdata.h:211
@ LGPL_V2
LGPL_V2, this has the same value as LicenseKey::LGPL, see https://spdx.org/licenses/LGPL-2....
Definition kaboutdata.h:207
@ GPL_V2
GPL_V2, this has the same value as LicenseKey::GPL, see https://spdx.org/licenses/GPL-2....
Definition kaboutdata.h:205
static KAboutLicense byKeyword(const QString &keyword)
Fetch a known license by a keyword/spdx ID.
Definition kaboutdata.cpp:430
KAboutLicense & operator=(const KAboutLicense &other)
Assignment operator.
Definition kaboutdata.cpp:419
This class is used to store information about a person or developer.
Definition kaboutdata.h:64
static KAboutPerson fromJSON(const QJsonObject &obj)
Creates a KAboutPerson from a JSON object with the following structure:
Definition kaboutdata.cpp:96
KAboutPerson(const QString &name=QString(), const QString &task=QString(), const QString &emailAddress=QString(), const QString &webAddress=QString(), const QUrl &avatarUrl=QUrl())
Convenience constructor.
Definition kaboutdata.cpp:48
QString name(StandardAction id)
Unknown
QByteArray & append(QByteArrayView data)
char * data()
QCommandLineOption addHelpOption()
bool addOption(const QCommandLineOption &option)
QCommandLineOption addVersionOption()
bool isSet(const QCommandLineOption &option) const const
void setApplicationDescription(const QString &description)
QString value(const QCommandLineOption &option) const const
applicationName
applicationVersion
QCoreApplication * instance()
organizationDomain
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
ReadOnly
QJsonValue value(QLatin1StringView key) const const
QString toString() const const
QVariant toVariant() const const
void append(QList< T > &&value)
iterator begin()
const_iterator constBegin() const const
const_iterator constEnd() const const
iterator end()
void removeFirst()
void reserve(qsizetype size)
qsizetype size() const const
QVariant property(const char *name) const const
bool setProperty(const char *name, QVariant &&value)
QString & append(QChar ch)
QString arg(Args &&... args) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
QString fromLatin1(QByteArrayView str)
QString fromUtf8(QByteArrayView str)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QByteArray toLatin1() const const
QString toLower() const const
QByteArray toUtf8() const const
QString trimmed() const const
QString join(QChar separator) const const
QString toString() const const
QStringView trimmed() const const
KeepEmptyParts
QString readAll()
QString host(ComponentFormattingOptions options) const const
bool isValid() const const
QString scheme() const const
void setUrl(const QString &url, ParsingMode parsingMode)
QString toString() const const
QUrl toUrl() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.