KOSRelease

Search for usage in LXR

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 27 of file kosrelease.h.

Constructor & Destructor Documentation

◆ KOSRelease()

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 181 of file kosrelease.cpp.

Member Function Documentation

◆ ansiColor()

QString KOSRelease::ansiColor ( ) const

◆ bugReportUrl()

QString KOSRelease::bugReportUrl ( ) const

◆ buildId()

QString KOSRelease::buildId ( ) const

◆ cpeName()

QString KOSRelease::cpeName ( ) const

◆ documentationUrl()

QString KOSRelease::documentationUrl ( ) const

◆ extraKeys()

QStringList KOSRelease::extraKeys ( ) const

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

Definition at line 278 of file kosrelease.cpp.

◆ extraValue()

QString KOSRelease::extraValue ( const QString & key) const

Extra values are values assoicated with keys that are unknown.

Definition at line 283 of file kosrelease.cpp.

◆ homeUrl()

QString KOSRelease::homeUrl ( ) const

◆ id()

QString KOSRelease::id ( ) const

◆ idLike()

QStringList KOSRelease::idLike ( ) const

◆ logo()

QString KOSRelease::logo ( ) const

◆ name()

QString KOSRelease::name ( ) const

◆ prettyName()

QString KOSRelease::prettyName ( ) const

◆ privacyPolicyUrl()

QString KOSRelease::privacyPolicyUrl ( ) const

◆ supportUrl()

QString KOSRelease::supportUrl ( ) const

◆ variant()

QString KOSRelease::variant ( ) const

◆ variantId()

QString KOSRelease::variantId ( ) const

◆ version()

QString KOSRelease::version ( ) const

◆ versionCodename()

QString KOSRelease::versionCodename ( ) const

◆ versionId()

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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.