KOSRelease Class
The OSRelease class parses /etc/os-release files. More...
- Header:
#include <KOSRelease> - CMake:
find_package(KF6 REQUIRED COMPONENTS CoreAddons)
target_link_libraries(mytarget PRIVATE KF6::CoreAddons)
List of all members, including inherited members
Public Functions
- KOSRelease(const QString &filePath = QString())
- QString ansiColor() const
- QString bugReportUrl() const
- QString buildId() const
- QString cpeName() const
- QString documentationUrl() const
- QStringList extraKeys() const
- QString extraValue(const QString &key) const
- QString homeUrl() const
- QString id() const
- QStringList idLike() const
- QString logo() const
- QString name() const
- QString prettyName() const
- QString privacyPolicyUrl() const
- QString supportUrl() const
- QString variant() const
- QString variantId() const
- QString version() const
- QString versionCodename() const
- QString versionId() const
Detailed Description
https://www.freedesktop.org/software/systemd/man/os-release.html
os-release is a free desktop standard for describing an operating system. This class parses and models os-release files.
Member Function Documentation
[explicit] KOSRelease::KOSRelease(const QString &filePath = QString())
Constructs a new OSRelease instance. Parsing happens in the constructor and the data is not cached across instances.
Note: The format specification makes no assertions about trailing # comments being supported. They result in undefined behavior.
filePath The path to the os-release file. By default the first available file of the paths specified in the os-release manpage is parsed.
QString KOSRelease::ansiColor() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#ANSI_COLOR=
QString KOSRelease::bugReportUrl() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL=
QString KOSRelease::buildId() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#BUILD_ID=
QString KOSRelease::cpeName() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#CPE_NAME=
QString KOSRelease::documentationUrl() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL=
QStringList KOSRelease::extraKeys() const
Extra keys are keys that are unknown or specified by a vendor.
QString KOSRelease::extraValue(const QString &key) const
Extra values are values associated with keys that are unknown.
QString KOSRelease::homeUrl() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL=
QString KOSRelease::id() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#ID=
QStringList KOSRelease::idLike() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#ID_LIKE=
QString KOSRelease::logo() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#LOGO=
QString KOSRelease::name() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#NAME=
QString KOSRelease::prettyName() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#PRETTY_NAME=
QString KOSRelease::privacyPolicyUrl() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL=
QString KOSRelease::supportUrl() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL=
QString KOSRelease::variant() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#VARIANT=
QString KOSRelease::variantId() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#VARIANT_ID=
QString KOSRelease::version() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#VERSION=
QString KOSRelease::versionCodename() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#VERSION_CODENAME=
QString KOSRelease::versionId() const
See https://www.freedesktop.org/software/systemd/man/os-release.html#VERSION_ID=