Commit 50ce5173 authored by Raine Makelainen's avatar Raine Makelainen

Merge branch 'omp-jb47664' into 'master'

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

See merge request mer-core/nemo-qml-plugin-systemsettings!124
parents 96af9a6d fff687fb
...@@ -269,6 +269,14 @@ QString AboutSettings::operatingSystemName() const ...@@ -269,6 +269,14 @@ QString AboutSettings::operatingSystemName() const
return d->osRelease["NAME"]; 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 QString AboutSettings::softwareVersion() const
{ {
Q_D(const AboutSettings); Q_D(const AboutSettings);
......
...@@ -50,6 +50,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject ...@@ -50,6 +50,7 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
Q_PROPERTY(QString localizedOperatingSystemName READ localizedOperatingSystemName CONSTANT) Q_PROPERTY(QString localizedOperatingSystemName READ localizedOperatingSystemName CONSTANT)
Q_PROPERTY(QString baseOperatingSystemName READ baseOperatingSystemName CONSTANT) Q_PROPERTY(QString baseOperatingSystemName READ baseOperatingSystemName CONSTANT)
Q_PROPERTY(QString operatingSystemName READ operatingSystemName 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 softwareVersion READ softwareVersion CONSTANT)
Q_PROPERTY(QString softwareVersionId READ softwareVersionId CONSTANT) Q_PROPERTY(QString softwareVersionId READ softwareVersionId CONSTANT)
Q_PROPERTY(QString adaptationVersion READ adaptationVersion CONSTANT) Q_PROPERTY(QString adaptationVersion READ adaptationVersion CONSTANT)
...@@ -81,6 +82,7 @@ public: ...@@ -81,6 +82,7 @@ public:
QString localizedOperatingSystemName() const; QString localizedOperatingSystemName() const;
QString baseOperatingSystemName() const; QString baseOperatingSystemName() const;
QString operatingSystemName() const; QString operatingSystemName() const;
QString localizedSoftwareVersion() const;
QString softwareVersion() const; QString softwareVersion() const;
QString softwareVersionId() const; QString softwareVersionId() const;
QString adaptationVersion() const; QString adaptationVersion() const;
......
...@@ -19,6 +19,7 @@ Module { ...@@ -19,6 +19,7 @@ Module {
Property { name: "localizedOperatingSystemName"; type: "string"; isReadonly: true } Property { name: "localizedOperatingSystemName"; type: "string"; isReadonly: true }
Property { name: "baseOperatingSystemName"; type: "string"; isReadonly: true } Property { name: "baseOperatingSystemName"; type: "string"; isReadonly: true }
Property { name: "operatingSystemName"; 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: "softwareVersion"; type: "string"; isReadonly: true }
Property { name: "softwareVersionId"; type: "string"; isReadonly: true } Property { name: "softwareVersionId"; type: "string"; isReadonly: true }
Property { name: "adaptationVersion"; 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