Commit 35740e47 authored by martinjones's avatar martinjones

[nemo-qml-plugin-systemsettings] Read vendor data info. Contributes to JB#35322

parent 88e161dd
......@@ -42,6 +42,7 @@
#include <QMap>
#include <QTextStream>
#include <QVariant>
#include <QSettings>
#include <mntent.h>
......@@ -186,6 +187,10 @@ AboutSettings::AboutSettings(QObject *parent)
: QObject(parent), m_sysinfo(new QStorageInfo(this)), m_netinfo(new QNetworkInfo(this)),
m_devinfo(new QDeviceInfo(this))
QSettings settings(QStringLiteral("/mnt/vendor_data/vendor-data.ini"), QSettings::IniFormat);
m_vendorName = settings.value(QStringLiteral("Name")).toString();
m_vendorVersion = settings.value(QStringLiteral("Version")).toString();
......@@ -265,6 +270,16 @@ QString AboutSettings::adaptationVersion() const
return m_hardwareRelease["VERSION_ID"];
QString AboutSettings::vendorName() const
return m_vendorName;
QString AboutSettings::vendorVersion() const
return m_vendorVersion;
void AboutSettings::refreshStorageModels()
// Optional mountpoints that we want to report disk usage for
......@@ -49,6 +49,8 @@ class AboutSettings: public QObject
Q_PROPERTY(QString softwareVersion READ softwareVersion CONSTANT)
Q_PROPERTY(QString softwareVersionId READ softwareVersionId CONSTANT)
Q_PROPERTY(QString adaptationVersion READ adaptationVersion CONSTANT)
Q_PROPERTY(QString vendorName READ vendorName CONSTANT)
Q_PROPERTY(QString vendorVersion READ vendorVersion CONSTANT)
Q_PROPERTY(QVariant internalStorageUsageModel READ diskUsageModel NOTIFY storageChanged)
Q_PROPERTY(QVariant externalStorageUsageModel READ externalStorageUsageModel NOTIFY storageChanged)
......@@ -81,6 +83,9 @@ public:
QString softwareVersionId() const;
QString adaptationVersion() const;
QString vendorName() const;
QString vendorVersion() const;
void storageChanged();
......@@ -93,6 +98,9 @@ private:
QVariantList m_externalStorage;
mutable QMap<QString, QString> m_osRelease;
mutable QMap<QString, QString> m_hardwareRelease;
QString m_vendorName;
QString m_vendorVersion;
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