Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meta-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
meta-nemo
Commits
7aad3c1b
Commit
7aad3c1b
authored
Oct 27, 2015
by
Florent Revest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a nemo-qml-plugin-systemsettings recipe
parent
fc8956f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
0 deletions
+93
-0
0001-Update-QStorageInfo-API-usage.patch
...n-systemsettings/0001-Update-QStorageInfo-API-usage.patch
+75
-0
nemo-qml-plugin-systemsettings_git.bb
...ugin-systemsettings/nemo-qml-plugin-systemsettings_git.bb
+18
-0
No files found.
recipes-nemomobile/nemo-qml-plugin-systemsettings/nemo-qml-plugin-systemsettings/0001-Update-QStorageInfo-API-usage.patch
0 → 100644
View file @
7aad3c1b
From 8cd5abea3b6c34c2e5e21c00a1b759c963ebf069 Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Mon, 26 Oct 2015 21:18:35 +0100
Subject: [PATCH] Update QStorageInfo API usage
---
src/aboutsettings.cpp | 10 ++++------
src/aboutsettings.h | 2 --
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/aboutsettings.cpp b/src/aboutsettings.cpp
index ef10c82..d1a2f89 100644
--- a/src/aboutsettings.cpp
+++ b/src/aboutsettings.cpp
@@ -118,11 +118,9 @@
static QMap<QString, QString> parseReleaseFile(const QString &filename)
AboutSettings::AboutSettings(QObject *parent)
: QObject(parent),
- m_sysinfo(new QStorageInfo(this)),
m_netinfo(new QNetworkInfo(this)),
m_devinfo(new QDeviceInfo(this))
{
- qDebug() << "Drives:" << m_sysinfo->allLogicalDrives();
}
AboutSettings::~AboutSettings()
@@ -131,12 +129,12 @@
AboutSettings::~AboutSettings()
qlonglong AboutSettings::totalDiskSpace() const
{
- return m_sysinfo->totalDiskSpace("/");
+ return QStorageInfo("/").bytesTotal();
}
qlonglong AboutSettings::availableDiskSpace() const
{
- return m_sysinfo->availableDiskSpace("/");
+ return QStorageInfo("/").bytesFree();
}
QVariant AboutSettings::diskUsageModel() const
@@ -172,8 +170,8 @@
QVariant AboutSettings::diskUsageModel() const
QVariantMap row;
row["storageType"] = (paths.count() == 1) ? QString("mass") : (path == "/") ? QString("system") : QString("user");
row["path"] = QString(path);
- row["available"] = m_sysinfo->availableDiskSpace(path);
- row["total"] = m_sysinfo->totalDiskSpace(path);
+ row["available"] = QStorageInfo(path).bytesFree();
+ row["total"] = QStorageInfo(path).bytesTotal();
result << QVariant(row);
}
diff --git a/src/aboutsettings.h b/src/aboutsettings.h
index dd3335a..bd3897f 100644
--- a/src/aboutsettings.h
+++ b/src/aboutsettings.h
@@ -35,7 +35,6 @@
#include <QObject>
#include <QVariant>
-class QStorageInfo;
class QNetworkInfo;
class QDeviceInfo;
class AboutSettings: public QObject
@@ -75,7 +74,6 @@
public:
QString adaptationVersion() const;
private:
- QStorageInfo *m_sysinfo;
QNetworkInfo *m_netinfo;
QDeviceInfo *m_devinfo;
};
--
2.6.1
recipes-nemomobile/nemo-qml-plugin-systemsettings/nemo-qml-plugin-systemsettings_git.bb
0 → 100644
View file @
7aad3c1b
SUMMARY = "QML Plugin for system settings on Nemo"
HOMEPAGE = "https://git.merproject.org/mer-core/nemo-qml-plugin-systemsettings"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://src/displaysettings.cpp;beginline=1;endline=31;md5=99ff23884718e3e2c85992a9294d18df"
SRC_URI = "git://git.merproject.org/mer-core/nemo-qml-plugin-systemsettings.git;protocol=https \
file://0001-Update-QStorageInfo-API-usage.patch"
SRCREV = "8e98f8c8069592d3dd21011743fdfb4d2efcc50a"
PR = "r1"
PV = "+git${SRCREV}"
S = "${WORKDIR}/git"
inherit qmake5
DEPENDS += "qtquickcontrols profiled usb-moded-qt5 mlite mce timed qtsystems"
RDEPENDS_${PN} += "qtquickcontrols-qmlplugins profiled"
FILES_${PN}-dbg += "/usr/lib/qt5/qml/org/nemomobile/systemsettings/.debug /opt/ /usr/share/nemo-qml-plugin-systemsettings-tests /usr/lib/nemo-qml-plugin-systemsettings-tests"
FILES_${PN} += "/usr/lib/qt5/qml/org/nemomobile/systemsettings/"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment