KOSRelease

KOSRelease Class Referencefinal

#include <kosrelease.h>

Public Member 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

The OSRelease class parses /etc/os-release files.

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.

Since
5.58.0

Definition at line 25 of file kosrelease.h.

Constructor & Destructor Documentation

KOSRelease::KOSRelease ( const QString filePath = QString())
explicit

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.
Parameters
filePathThe path to the os-release file. By default the first available file of the paths specified in the os-release manpage is parsed.

Definition at line 183 of file kosrelease.cpp.

Member Function Documentation

QString KOSRelease::ansiColor ( ) const
QString KOSRelease::bugReportUrl ( ) const
QString KOSRelease::buildId ( ) const
QString KOSRelease::cpeName ( ) const
QString KOSRelease::documentationUrl ( ) const
QStringList KOSRelease::extraKeys ( ) const

Extra keys are keys that are unknown or specified by a vendor.

Definition at line 283 of file kosrelease.cpp.

QString KOSRelease::extraValue ( const QString key) const

Extra values are values assoicated with keys that are unknown.

Definition at line 288 of file kosrelease.cpp.

QString KOSRelease::homeUrl ( ) const
QString KOSRelease::id ( ) const
QStringList KOSRelease::idLike ( ) const
QString KOSRelease::logo ( ) const
QString KOSRelease::name ( ) const
QString KOSRelease::prettyName ( ) const
QString KOSRelease::privacyPolicyUrl ( ) const
QString KOSRelease::supportUrl ( ) const
QString KOSRelease::variant ( ) const
QString KOSRelease::variantId ( ) const
QString KOSRelease::version ( ) const
QString KOSRelease::versionCodename ( ) const
QString KOSRelease::versionId ( ) const

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 22:52:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.