Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

Commit 021e8b2

Browse files
committed
[settings-about] Cleanup internal & externalStorageModels. Contributes to JB#46110
1 parent acae8e2 commit 021e8b2

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

src/aboutsettings.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ QVariant AboutSettings::diskUsageModel() const
153153
return m_internalStorage;
154154
}
155155

156-
QVariant AboutSettings::externalStorageUsageModel() const
157-
{
158-
return m_externalStorage;
159-
}
160-
161156
QString AboutSettings::wlanMacAddress() const
162157
{
163158
return m_netinfo->macAddress(QNetworkInfo::WlanMode, 0);
@@ -258,7 +253,6 @@ void AboutSettings::partitionCountChanged()
258253
void AboutSettings::reloadStorageLists()
259254
{
260255
m_internalStorage.clear();
261-
m_externalStorage.clear();
262256

263257
for (auto partition : m_partitionManager.partitions()) {
264258
QVariantMap row;
@@ -283,9 +277,7 @@ void AboutSettings::reloadStorageLists()
283277
}
284278
}();
285279

286-
if (partition.storageType() == Partition::External) {
287-
m_externalStorage << QVariant(row);
288-
} else {
280+
if (partition.storageType() != Partition::External) {
289281
m_internalStorage << QVariant(row);
290282
}
291283
}

src/aboutsettings.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
5555
Q_PROPERTY(QString vendorName READ vendorName CONSTANT)
5656
Q_PROPERTY(QString vendorVersion READ vendorVersion CONSTANT)
5757

58-
Q_PROPERTY(QVariant internalStorageUsageModel READ diskUsageModel NOTIFY storageChanged)
59-
Q_PROPERTY(QVariant externalStorageUsageModel READ externalStorageUsageModel NOTIFY storageChanged)
60-
6158
public:
6259
explicit AboutSettings(QObject *parent = 0);
6360
virtual ~AboutSettings();
@@ -75,7 +72,6 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
7572
* - total: total bytes on the storage
7673
**/
7774
Q_INVOKABLE QVariant diskUsageModel() const;
78-
QVariant externalStorageUsageModel() const;
7975
Q_INVOKABLE void refreshStorageModels();
8076

8177
QString wlanMacAddress() const;
@@ -101,7 +97,6 @@ class SYSTEMSETTINGS_EXPORT AboutSettings: public QObject
10197
QDeviceInfo *m_devinfo;
10298

10399
QVariantList m_internalStorage;
104-
QVariantList m_externalStorage;
105100
PartitionManager m_partitionManager;
106101

107102
mutable QMap<QString, QString> m_osRelease;

src/plugin/plugins.qmltypes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ Module {
2323
Property { name: "adaptationVersion"; type: "string"; isReadonly: true }
2424
Property { name: "vendorName"; type: "string"; isReadonly: true }
2525
Property { name: "vendorVersion"; type: "string"; isReadonly: true }
26-
Property { name: "internalStorageUsageModel"; type: "QVariant"; isReadonly: true }
27-
Property { name: "externalStorageUsageModel"; type: "QVariant"; isReadonly: true }
2826
Signal { name: "storageChanged" }
2927
Method { name: "totalDiskSpace"; type: "qlonglong" }
3028
Method { name: "availableDiskSpace"; type: "qlonglong" }

0 commit comments

Comments
 (0)