Commit 70a64d96 authored by Raine Makelainen's avatar Raine Makelainen

Merge branch 'jb46079' into 'master'

[systemsettings] Expose baseOperatingSystemName that does not contain OS suffix.  Contributes to JB#46079

See merge request !108
parents 5ea99863 364291fa
......@@ -194,6 +194,15 @@ QString AboutSettings::serial() const
return QString();
}
QString AboutSettings::baseOperatingSystemName() const
{
QString osName = operatingSystemName();
if (osName.endsWith(QStringLiteral(" OS"))) {
osName.chop(3);
}
return osName;
}
QString AboutSettings::operatingSystemName() 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 baseOperatingSystemName READ baseOperatingSystemName CONSTANT)
Q_PROPERTY(QString operatingSystemName READ operatingSystemName CONSTANT)
Q_PROPERTY(QString softwareVersion READ softwareVersion CONSTANT)
Q_PROPERTY(QString softwareVersionId READ softwareVersionId CONSTANT)
......@@ -80,6 +81,7 @@ public:
QString wlanMacAddress() const;
QString imei() const;
QString serial() const;
QString baseOperatingSystemName() const;
QString operatingSystemName() const;
QString softwareVersion() const;
QString softwareVersionId() 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