Commit 021e8b24 authored by Raine Makelainen's avatar Raine Makelainen

[settings-about] Cleanup internal & externalStorageModels. Contributes to JB#46110

parent acae8e22
......@@ -153,11 +153,6 @@ QVariant AboutSettings::diskUsageModel() const
return m_internalStorage;
}
QVariant AboutSettings::externalStorageUsageModel() const
{
return m_externalStorage;
}
QString AboutSettings::wlanMacAddress() const
{
return m_netinfo->macAddress(QNetworkInfo::WlanMode, 0);
......@@ -258,7 +253,6 @@ void AboutSettings::partitionCountChanged()
void AboutSettings::reloadStorageLists()
{
m_internalStorage.clear();
m_externalStorage.clear();
for (auto partition : m_partitionManager.partitions()) {
QVariantMap row;
......@@ -283,9 +277,7 @@ void AboutSettings::reloadStorageLists()
}
}();
if (partition.storageType() == Partition::External) {
m_externalStorage << QVariant(row);
} else {
if (partition.storageType() != Partition::External) {
m_internalStorage << QVariant(row);
}
}
......
......@@ -55,9 +55,6 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
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)
public:
explicit AboutSettings(QObject *parent = 0);
virtual ~AboutSettings();
......@@ -75,7 +72,6 @@ public:
* - total: total bytes on the storage
**/
Q_INVOKABLE QVariant diskUsageModel() const;
QVariant externalStorageUsageModel() const;
Q_INVOKABLE void refreshStorageModels();
QString wlanMacAddress() const;
......@@ -101,7 +97,6 @@ private:
QDeviceInfo *m_devinfo;
QVariantList m_internalStorage;
QVariantList m_externalStorage;
PartitionManager m_partitionManager;
mutable QMap<QString, QString> m_osRelease;
......
......@@ -23,8 +23,6 @@ Module {
Property { name: "adaptationVersion"; type: "string"; isReadonly: true }
Property { name: "vendorName"; type: "string"; isReadonly: true }
Property { name: "vendorVersion"; type: "string"; isReadonly: true }
Property { name: "internalStorageUsageModel"; type: "QVariant"; isReadonly: true }
Property { name: "externalStorageUsageModel"; type: "QVariant"; isReadonly: true }
Signal { name: "storageChanged" }
Method { name: "totalDiskSpace"; type: "qlonglong" }
Method { name: "availableDiskSpace"; type: "qlonglong" }
......
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