=== modified file 'debian/changelog'
--- debian/changelog 2015-02-11 17:34:13 +0000
+++ debian/changelog 2015-02-13 12:14:50 +0000
@@ -1,3 +1,12 @@
+ubuntu-system-settings (0.3+15.04.20150211.1-0ubuntu2) UNRELEASED; urgency=medium
+
+ * Disable StorageInfo use temporarily while a fix for the upstream class
+ removal is being done.
+ * Adapt WIP lp:~laney/ubuntu-system-settings/storageinfo-5.4 to keep the
+ entry and free space info visible while disabling the clickablity.
+
+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Fri, 13 Feb 2015 12:12:45 +0200
+
ubuntu-system-settings (0.3+15.04.20150211.1-0ubuntu1) vivid; urgency=medium
[ jonas-drange ]
=== modified file 'plugins/about/PageComponent.qml'
--- plugins/about/PageComponent.qml 2015-01-14 00:00:41 +0000
+++ plugins/about/PageComponent.qml 2015-02-13 12:13:38 +0000
@@ -38,11 +38,11 @@
UbuntuStorageAboutPanel {
id: backendInfos
}
-
+/*
StorageInfo {
id: storageInfo
}
-
+*/
DeviceInfo {
id: deviceInfos
}
@@ -169,9 +169,9 @@
objectName: "storageItem"
text: i18n.tr("Storage")
/* TRANSLATORS: that's the free disk space, indicated in the most appropriate storage unit */
- value: i18n.tr("%1 free").arg(Utilities.formatSize(storageInfo.availableDiskSpace("/home")))
+ value: i18n.tr("%1 free").arg(Utilities.formatSize(backendInfos.getFreeSpace("/home")))
progression: true
- onClicked: pageStack.push(Qt.resolvedUrl("Storage.qml"))
+ /*onClicked: pageStack.push(Qt.resolvedUrl("Storage.qml"))*/
}
SettingsItemTitle {
=== modified file 'plugins/about/storageabout.cpp'
--- plugins/about/storageabout.cpp 2015-02-13 10:17:32 +0000
+++ plugins/about/storageabout.cpp 2015-02-13 11:46:58 +0000
@@ -32,6 +32,7 @@
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
+#include <QtCore/QStorageInfo>
#include <QtCore/QSharedPointer>
#include <QProcess>
#include <QVariant>
@@ -345,6 +346,15 @@
return s_mount_point;
}
+qint64 StorageAbout::getFreeSpace(const QString mount_point)
+{
+ QStorageInfo si(mount_point);
+ if (si.isValid())
+ return si.bytesFree();
+
+ return -1;
+}
+
StorageAbout::~StorageAbout() {
if (m_cancellable) {
g_cancellable_cancel(m_cancellable);
=== modified file 'plugins/about/storageabout.h'
--- plugins/about/storageabout.h 2014-10-24 20:04:30 +0000
+++ plugins/about/storageabout.h 2015-02-13 11:10:47 +0000
@@ -111,6 +111,7 @@
quint64 getHomeSize();
Q_INVOKABLE void populateSizes();
Q_INVOKABLE QString getDevicePath (const QString mount_point);
+ Q_INVOKABLE qint64 getFreeSpace (const QString mount_point);
bool getDeveloperMode();
void setDeveloperMode(bool newMode);