This repository was archived by the owner on Apr 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,14 @@ QString AboutSettings::operatingSystemName() const
269
269
return d->osRelease [" NAME" ];
270
270
}
271
271
272
+ QString AboutSettings::localizedSoftwareVersion () const
273
+ {
274
+ Q_D (const AboutSettings);
275
+ parseLocalizationFile (QStringLiteral (" /etc/os-release-l10n" ), &d->osReleaseLocalization );
276
+
277
+ return d->osReleaseLocalization .value (" VERSION" , softwareVersion ());
278
+ }
279
+
272
280
QString AboutSettings::softwareVersion () const
273
281
{
274
282
Q_D (const AboutSettings);
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
50
50
Q_PROPERTY (QString localizedOperatingSystemName READ localizedOperatingSystemName CONSTANT)
51
51
Q_PROPERTY (QString baseOperatingSystemName READ baseOperatingSystemName CONSTANT)
52
52
Q_PROPERTY (QString operatingSystemName READ operatingSystemName CONSTANT)
53
+ Q_PROPERTY (QString localizedSoftwareVersion READ localizedSoftwareVersion CONSTANT)
53
54
Q_PROPERTY (QString softwareVersion READ softwareVersion CONSTANT)
54
55
Q_PROPERTY (QString softwareVersionId READ softwareVersionId CONSTANT)
55
56
Q_PROPERTY (QString adaptationVersion READ adaptationVersion CONSTANT)
@@ -81,6 +82,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
81
82
QString localizedOperatingSystemName () const ;
82
83
QString baseOperatingSystemName () const ;
83
84
QString operatingSystemName () const ;
85
+ QString localizedSoftwareVersion () const ;
84
86
QString softwareVersion () const ;
85
87
QString softwareVersionId () const ;
86
88
QString adaptationVersion () const ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ Module {
19
19
Property { name: "localizedOperatingSystemName"; type: "string"; isReadonly: true }
20
20
Property { name: "baseOperatingSystemName"; type: "string"; isReadonly: true }
21
21
Property { name: "operatingSystemName"; type: "string"; isReadonly: true }
22
+ Property { name: "localizedSoftwareVersion"; type: "string"; isReadonly: true }
22
23
Property { name: "softwareVersion"; type: "string"; isReadonly: true }
23
24
Property { name: "softwareVersionId"; type: "string"; isReadonly: true }
24
25
Property { name: "adaptationVersion"; type: "string"; isReadonly: true }
You can’t perform that action at this time.
0 commit comments