This repository was archived by the owner on Apr 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,15 @@ QString AboutSettings::serial() const
194
194
return QString ();
195
195
}
196
196
197
+ QString AboutSettings::baseOperatingSystemName () const
198
+ {
199
+ QString osName = operatingSystemName ();
200
+ if (osName.endsWith (QStringLiteral (" OS" ))) {
201
+ osName.chop (3 );
202
+ }
203
+ return osName;
204
+ }
205
+
197
206
QString AboutSettings::operatingSystemName () const
198
207
{
199
208
parseReleaseFile (QStringLiteral (" /etc/os-release" ), &m_osRelease);
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
47
47
Q_PROPERTY (QString wlanMacAddress READ wlanMacAddress CONSTANT)
48
48
Q_PROPERTY (QString imei READ imei CONSTANT)
49
49
Q_PROPERTY (QString serial READ serial CONSTANT)
50
+ Q_PROPERTY (QString baseOperatingSystemName READ baseOperatingSystemName CONSTANT)
50
51
Q_PROPERTY (QString operatingSystemName READ operatingSystemName CONSTANT)
51
52
Q_PROPERTY (QString softwareVersion READ softwareVersion CONSTANT)
52
53
Q_PROPERTY (QString softwareVersionId READ softwareVersionId CONSTANT)
@@ -80,6 +81,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
80
81
QString wlanMacAddress () const ;
81
82
QString imei () const ;
82
83
QString serial () const ;
84
+ QString baseOperatingSystemName () const ;
83
85
QString operatingSystemName () const ;
84
86
QString softwareVersion () const ;
85
87
QString softwareVersionId () const ;
You can’t perform that action at this time.
0 commit comments