Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[nemo-qml-plugin-systemsettings] Provide OS name from os-release. Con…
…tributes to JB#40909
  • Loading branch information
pvuorela committed Jan 24, 2018
1 parent 813b0e9 commit 86a8d8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/aboutsettings.cpp
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/aboutsettings.h
Expand Up @@ -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)
Expand Down Expand Up @@ -79,6 +80,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
QString wlanMacAddress() const;
QString imei() const;
QString serial() const;
QString operatingSystemName() const;
QString softwareVersion() const;
QString softwareVersionId() const;
QString adaptationVersion() const;
Expand Down

0 comments on commit 86a8d8d

Please sign in to comment.