Commit fff687fb authored by Dmitry Gerasimov's avatar Dmitry Gerasimov

[aboutsettings] Add property with localized version. Contributes to JB#47664

parent 2e04b05b
......@@ -269,6 +269,14 @@ QString AboutSettings::operatingSystemName() const
return d->osRelease["NAME"];
}
QString AboutSettings::localizedSoftwareVersion() const
{
Q_D(const AboutSettings);
parseLocalizationFile(QStringLiteral("/etc/os-release-l10n"), &d->osReleaseLocalization);
return d->osReleaseLocalization.value("VERSION", softwareVersion());
}
QString AboutSettings::softwareVersion() const
{
Q_D(const AboutSettings);
......
......@@ -50,6 +50,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
Q_PROPERTY(QString localizedOperatingSystemName READ localizedOperatingSystemName CONSTANT)
Q_PROPERTY(QString baseOperatingSystemName READ baseOperatingSystemName CONSTANT)
Q_PROPERTY(QString operatingSystemName READ operatingSystemName CONSTANT)
Q_PROPERTY(QString localizedSoftwareVersion READ localizedSoftwareVersion CONSTANT)
Q_PROPERTY(QString softwareVersion READ softwareVersion CONSTANT)
Q_PROPERTY(QString softwareVersionId READ softwareVersionId CONSTANT)
Q_PROPERTY(QString adaptationVersion READ adaptationVersion CONSTANT)
......@@ -81,6 +82,7 @@ public:
QString localizedOperatingSystemName() const;
QString baseOperatingSystemName() const;
QString operatingSystemName() const;
QString localizedSoftwareVersion() const;
QString softwareVersion() const;
QString softwareVersionId() const;
QString adaptationVersion() const;
......
......@@ -19,6 +19,7 @@ Module {
Property { name: "localizedOperatingSystemName"; type: "string"; isReadonly: true }
Property { name: "baseOperatingSystemName"; type: "string"; isReadonly: true }
Property { name: "operatingSystemName"; type: "string"; isReadonly: true }
Property { name: "localizedSoftwareVersion"; type: "string"; isReadonly: true }
Property { name: "softwareVersion"; type: "string"; isReadonly: true }
Property { name: "softwareVersionId"; type: "string"; isReadonly: true }
Property { name: "adaptationVersion"; type: "string"; isReadonly: true }
......
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