Commit 0c303461 authored by pvuorela's avatar pvuorela

Merge branch 'os_release_name' into 'master'

Provide OS name from os-release

See merge request !39
parents 813b0e9a 86a8d8df
......@@ -178,6 +178,13 @@ QString AboutSettings::serial() const
}
}
QString AboutSettings::operatingSystemName() const
{
parseReleaseFile(QStringLiteral("/etc/os-release"), &m_osRelease);
return m_osRelease["NAME"];
}
QString AboutSettings::softwareVersion() const
{
parseReleaseFile(QStringLiteral("/etc/os-release"), &m_osRelease);
......
......@@ -47,6 +47,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
Q_PROPERTY(QString wlanMacAddress READ wlanMacAddress CONSTANT)
Q_PROPERTY(QString imei READ imei CONSTANT)
Q_PROPERTY(QString serial READ serial CONSTANT)
Q_PROPERTY(QString operatingSystemName READ operatingSystemName CONSTANT)
Q_PROPERTY(QString softwareVersion READ softwareVersion CONSTANT)
Q_PROPERTY(QString softwareVersionId READ softwareVersionId CONSTANT)
Q_PROPERTY(QString adaptationVersion READ adaptationVersion CONSTANT)
......@@ -79,6 +80,7 @@ public:
QString wlanMacAddress() const;
QString imei() const;
QString serial() const;
QString operatingSystemName() const;
QString softwareVersion() const;
QString softwareVersionId() const;
QString adaptationVersion() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment