Commit 364291fa authored by Raine Makelainen's avatar Raine Makelainen

[systemsettings] Expose baseOperatingSystemName that does not contain OS...

[systemsettings] Expose baseOperatingSystemName that does not contain OS suffix. Contributes to JB#46079
parent 5ea99863
......@@ -194,6 +194,15 @@ QString AboutSettings::serial() const
return QString();
QString AboutSettings::baseOperatingSystemName() const
QString osName = operatingSystemName();
if (osName.endsWith(QStringLiteral(" OS"))) {
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 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