Merge lp:~ogra/ubuntu-system-settings/developer-mode into lp:ubuntu-system-settings

Proposed by Oliver Grawert
Status: Merged
Approved by: Ken VanDine
Approved revision: 829
Merged at revision: 831
Proposed branch: lp:~ogra/ubuntu-system-settings/developer-mode
Merge into: lp:ubuntu-system-settings
Diff against target: 268 lines (+161/-1)
6 files modified
debian/control (+2/-0)
plugins/about/CMakeLists.txt (+2/-1)
plugins/about/DevMode.qml (+109/-0)
plugins/about/PageComponent.qml (+7/-0)
plugins/about/storageabout.cpp (+28/-0)
plugins/about/storageabout.h (+13/-0)
To merge this branch: bzr merge lp:~ogra/ubuntu-system-settings/developer-mode
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot continuous-integration Approve
Sebastien Bacher (community) Needs Fixing
Iain Lane Needs Fixing
Review via email: mp+227822@code.launchpad.net

Commit message

* Add DeveloperMode page to "About this device" (see:
  https://wiki.ubuntu.com/AboutThisDevice#developer-mode)

* Enable toggling of the adb usb gadget driver in DeveloperMode page through the dbus-property-service interface

* Add shortcut from DeveloperMode page to Lock screen settings (since the final dev mode will require that you can lock before enabling it)

* Depend on suru-icon-theme since we are using the security alert icon on the Developer Mode page.

* Depend on dbus-property-service on the arches where it is available since we use it in Developer Mode

Description of the change

Initial code for offering developer mode in system-settings accoding to https://wiki.ubuntu.com/AboutThisDevice#developer-mode

To post a comment you must log in.
Revision history for this message
Oliver Grawert (ogra) wrote :

Note that the Lock screen support waits for finished locking support ...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:823
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1037/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2347
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1926/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/229
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/229
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/229/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/229
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2530
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3561
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3561/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10253
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1615/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2162
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2162/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1037/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Iain Lane (laney) wrote :

Inline comments. I didn't check runtime yet.

review: Needs Fixing
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks, I added some review comments about strings/UIs that need to be changed

review: Needs Fixing
824. By Oliver Grawert

rename developerModeState to getDeveloperMode and move this function to dbus, rename developerModeToggle to toggleDeveloperMode and use dbus data as base, define dbus path and object in namespace, fix text and text visuals

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:824
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1044/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2398
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1955/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/236
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/236
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/236/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/236
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2564
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3624
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3624/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10301
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1636/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2200
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2200/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1044/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

The last FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1636/console was caused by a hung test machine. I've triggered a rebuild of this MP.

825. By Oliver Grawert

use teh return value after toggling for the clicked state of the switch, drop useless GetProperty call

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:824
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1045/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2402
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1958
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/237
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/237
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/237/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/237
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2569
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3629
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3629/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10307
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1640
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2204
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2204/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1045/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:825
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1046/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2408
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1962
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/238
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/238
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/238/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/238
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2575
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3637
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3637/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10315
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1643
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2208
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2208/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1046/rebuild

review: Approve (continuous-integration)
826. By Oliver Grawert

make sure the lock label is slim emough to get word-wrapped

827. By Oliver Grawert

move to a global dbus interface to drop code duplication (thanks mandel for the help!)

828. By Oliver Grawert

drop unused QDBusInterface from storageabout.cpp

829. By Oliver Grawert

add icon theme (we use the security-alert icon in developer mode, and dbus-property-service to package deps

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:826
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1050/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2427
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1976
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/242
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/242
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/242/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/242
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2596
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3659
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3659/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10341
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1654
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2226
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2226/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1050/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:829
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1051/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2440
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1985
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/243
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/243
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/243/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/243
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2604
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3673
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3673/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10349
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1661
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2235
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2235/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1051/rebuild

review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Looks good now and tested on mako

review: Approve
830. By Oliver Grawert

only depend on dbus-property-service on arches where it can be used

831. By Oliver Grawert

oops, move the deps from build-deps to actual binary deps

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-07-21 14:50:32 +0000
3+++ debian/control 2014-07-25 10:52:54 +0000
4@@ -47,6 +47,7 @@
5 accountsservice,
6 accountsservice-ubuntu-touch-schemas,
7 bluez (>= 4.36),
8+ dbus-property-service [amd64 armhf i386],
9 gsettings-desktop-schemas,
10 gsettings-ubuntu-touch-schemas (>= 0.0.1+14.04.20140130.1),
11 indicator-bluetooth (>> 0.0.6+13.10.20131010),
12@@ -61,6 +62,7 @@
13 qtdeclarative5-ubuntu-content0.1,
14 qtdeclarative5-ubuntu-settings-components (> 0.2),
15 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.46+14.04.20131126-0ubuntu1) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,
16+ suru-icon-theme,
17 whoopsie-preferences (>= 0.9),
18 libsystemsettings1 (= ${binary:Version}),
19 system-image-dbus (>= 0.9),
20
21=== modified file 'plugins/about/CMakeLists.txt'
22--- plugins/about/CMakeLists.txt 2014-06-23 21:18:17 +0000
23+++ plugins/about/CMakeLists.txt 2014-07-25 10:52:54 +0000
24@@ -13,13 +13,14 @@
25 StorageBar.qml
26 StorageItem.qml
27 Version.qml
28+ DevMode.qml
29 fakepkgslist.xml
30 )
31
32 add_library(UbuntuStorageAboutPanel MODULE
33 plugin.cpp storageabout.cpp click.cpp plugin.h storageabout.h click.h
34 ${QML_SOURCES}) # So they show up in Qt designer.
35-qt5_use_modules(UbuntuStorageAboutPanel Qml Quick)
36+qt5_use_modules(UbuntuStorageAboutPanel Qml Quick DBus)
37 target_link_libraries(UbuntuStorageAboutPanel
38 ${ANDR_PROP_LDFLAGS} ${GLIB_LDFLAGS} ${GIO_LDFLAGS})
39
40
41=== added file 'plugins/about/DevMode.qml'
42--- plugins/about/DevMode.qml 1970-01-01 00:00:00 +0000
43+++ plugins/about/DevMode.qml 2014-07-25 10:52:54 +0000
44@@ -0,0 +1,109 @@
45+/*
46+ * This file is part of system-settings
47+ *
48+ * Copyright (C) 2014 Canonical Ltd.
49+ *
50+ * Contact: Oliver Grawert <ogra@canonical.com>
51+ *
52+ * This program is free software: you can redistribute it and/or modify it
53+ * under the terms of the GNU General Public License version 3, as published
54+ * by the Free Software Foundation.
55+ *
56+ * This program is distributed in the hope that it will be useful, but
57+ * WITHOUT ANY WARRANTY; without even the implied warranties of
58+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
59+ * PURPOSE. See the GNU General Public License for more details.
60+ *
61+ * You should have received a copy of the GNU General Public License along
62+ * with this program. If not, see <http://www.gnu.org/licenses/>.
63+ *
64+ * Author: Oliver Grawert <ogra@ubuntu.com>
65+ *
66+ */
67+
68+import QtQuick 2.0
69+import Qt.labs.folderlistmodel 1.0
70+import SystemSettings 1.0
71+import Ubuntu.Components 0.1
72+import Ubuntu.Components.ListItems 0.1 as ListItem
73+import Ubuntu.SystemSettings.StorageAbout 1.0
74+
75+ItemPage {
76+ id: versionPage
77+ objectName: "versionPage"
78+ title: i18n.tr("Developer Mode")
79+
80+ UbuntuStorageAboutPanel {
81+ id: storedInfo
82+ }
83+
84+ Flickable {
85+ anchors.fill: parent
86+
87+ Column {
88+ anchors.fill: parent
89+
90+ ListItem.SingleValue {
91+ objectName: "devModeWarningItem"
92+ height: warningColumn.childrenRect.height + units.gu(2)
93+
94+ Column {
95+ anchors.fill: parent
96+ anchors.topMargin: units.gu(1)
97+
98+ id: warningColumn
99+ spacing: units.gu(2)
100+ Icon {
101+ id: warnIcon
102+ width: parent.width/4
103+ height: width
104+ name: "security-alert"
105+ anchors.horizontalCenter: parent.horizontalCenter
106+ }
107+ Label {
108+ id: warnText
109+ width: parent.width
110+ horizontalAlignment: Text.AlignHCenter
111+ wrapMode: Text.WordWrap
112+ text: i18n.tr("In Developer Mode, anyone can access, " +
113+ "change or delete anything on this " +
114+ "phone by connecting it to " +
115+ "another device.")
116+ }
117+ }
118+ }
119+
120+ ListItem.Standard {
121+ text: i18n.tr("Developer Mode")
122+ control: Switch {
123+ id: devModeSwitch
124+ checked: storedInfo.getDeveloperMode
125+ onClicked: checked = storedInfo.toggleDeveloperMode
126+ }
127+ }
128+
129+ ListItem.Divider {}
130+
131+ ListItem.SingleValue {
132+ Label {
133+ id: "lockSecurityLabel"
134+ width: parent.width
135+ anchors.verticalCenter: parent.verticalCenter
136+ anchors.horizontalCenter: parent.horizontalCenter
137+ horizontalAlignment: Text.AlignHCenter
138+ wrapMode: Text.WordWrap
139+ text: i18n.tr("You need a passcode or passphrase set " +
140+ "to use Developer Mode.")
141+ }
142+ }
143+
144+ ListItem.SingleValue {
145+ objectName: "lockSecurityItem"
146+ text: i18n.tr("Lock security")
147+ progression: true
148+ onClicked: pageStack.push(Qt.resolvedUrl("../security-privacy/LockSecurity.qml"))
149+ }
150+ }
151+ }
152+}
153+
154
155=== modified file 'plugins/about/PageComponent.qml'
156--- plugins/about/PageComponent.qml 2014-07-17 09:51:33 +0000
157+++ plugins/about/PageComponent.qml 2014-07-25 10:52:54 +0000
158@@ -179,6 +179,13 @@
159 visible: regulatoryInfo
160 onClicked: pageStack.push(regulatoryInfo.pageComponent)
161 }
162+
163+ ListItem.SingleValue {
164+ objectName: "devmodeItem"
165+ text: i18n.tr("Developer mode")
166+ progression: true
167+ onClicked: pageStack.push(Qt.resolvedUrl("DevMode.qml"))
168+ }
169 }
170 }
171 }
172
173=== modified file 'plugins/about/storageabout.cpp'
174--- plugins/about/storageabout.cpp 2014-07-16 15:30:48 +0000
175+++ plugins/about/storageabout.cpp 2014-07-25 10:52:54 +0000
176@@ -34,6 +34,12 @@
177 #include <QVariant>
178 #include "storageabout.h"
179 #include <hybris/properties/properties.h>
180+#include <QDBusReply>
181+
182+namespace {
183+ const QString PROPERTY_SERVICE_PATH = "/com/canonical/PropertyService";
184+ const QString PROPERTY_SERVICE_OBJ = "com.canonical.PropertyService";
185+}
186
187 struct MeasureData {
188 uint *running;
189@@ -131,6 +137,10 @@
190 QObject(parent),
191 m_clickModel(),
192 m_clickFilterProxy(&m_clickModel),
193+ m_propertyService(new QDBusInterface(PROPERTY_SERVICE_OBJ,
194+ PROPERTY_SERVICE_PATH,
195+ PROPERTY_SERVICE_OBJ,
196+ QDBusConnection::systemBus())),
197 m_cancellable(NULL)
198 {
199 }
200@@ -206,6 +216,24 @@
201 return m_ubuntuBuildID;
202 }
203
204+bool StorageAbout::getDeveloperMode()
205+{
206+ QDBusReply<bool> reply = m_propertyService->call("GetProperty", "adb");
207+
208+ if (reply.isValid()) {
209+ return reply.value();
210+ } else {
211+ qWarning("devMode: no reply from dbus property service");
212+ return false;
213+ }
214+}
215+
216+bool StorageAbout::toggleDeveloperMode()
217+{
218+ m_propertyService->call("SetProperty", "adb", !getDeveloperMode());
219+ return getDeveloperMode();
220+}
221+
222 QString StorageAbout::licenseInfo(const QString &subdir) const
223 {
224
225
226=== modified file 'plugins/about/storageabout.h'
227--- plugins/about/storageabout.h 2014-07-16 15:30:48 +0000
228+++ plugins/about/storageabout.h 2014-07-25 10:52:54 +0000
229@@ -29,6 +29,7 @@
230 #include <QObject>
231 #include <QProcess>
232 #include <QVariant>
233+#include <QDBusInterface>
234
235
236 class StorageAbout : public QObject
237@@ -86,6 +87,14 @@
238 READ ubuntuBuildID
239 CONSTANT)
240
241+ Q_PROPERTY( bool getDeveloperMode
242+ READ getDeveloperMode
243+ CONSTANT)
244+
245+ Q_PROPERTY( bool toggleDeveloperMode
246+ READ toggleDeveloperMode
247+ CONSTANT)
248+
249 public:
250 explicit StorageAbout(QObject *parent = 0);
251 ~StorageAbout();
252@@ -106,6 +115,8 @@
253 Q_INVOKABLE QString formatSize (quint64 size) const;
254 Q_INVOKABLE void populateSizes();
255 Q_INVOKABLE QString getDevicePath (const QString mount_point);
256+ bool getDeveloperMode();
257+ bool toggleDeveloperMode();
258
259 Q_SIGNALS:
260 void sortRoleChanged();
261@@ -127,6 +138,8 @@
262
263 QMap<QString, QString> m_mounts;
264
265+ QScopedPointer<QDBusInterface> m_propertyService;
266+
267 GCancellable *m_cancellable;
268 };
269

Subscribers

People subscribed via source and target branches