Merge lp:~nik90/permy/update-permy-1.3 into lp:permy

Proposed by Nekhelesh Ramananthan
Status: Merged
Merged at revision: 83
Proposed branch: lp:~nik90/permy/update-permy-1.3
Merge into: lp:permy
Diff against target: 347 lines (+128/-87)
7 files modified
main.qml (+93/-79)
manifest.json (+2/-1)
ui/AboutPage.qml (+10/-4)
ui/AppListModel.qml (+1/-1)
ui/AppModel.qml (+1/-1)
ui/PolicyGroupsModel.qml (+1/-1)
ui/SubtitledListItem.qml (+20/-0)
To merge this branch: bzr merge lp:~nik90/permy/update-permy-1.3
Reviewer Review Type Date Requested Status
Jamie Strandboge Approve
Review via email: mp+290000@code.launchpad.net

Commit message

- Updated to QtQuick 2.4 (UC 1.3 requires this)
- Updated to Ubuntu.Components 1.3
- Switched to the new ListItem{} instead of the deprecated ListItem.Subtitled{}.
- Switched to PageHeader{}
- Updated framework to ubuntu-sdk-15.04.3

Description of the change

Hi jdstrand, I figured I would bring Permy up to date with the latest SDK :). This MP does the following,

- Updated to QtQuick 2.4 (UC 1.3 requires this)
- Updated to Ubuntu.Components 1.3
- Switched to the new ListItem{} instead of the deprecated ListItem.Subtitled{}.
- Switched to PageHeader{}
- Updated framework to ubuntu-sdk-15.04.3

Once OTA-10 lands, the framework can be bumped again to ubuntu-sdk-15.04.4. I wasn't sure when you would release an update, so I stuck to .3.

Switching to UC 1.3 also means that we can switch to SuruDark theme since the subtitle text color bug has been fixed!

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Mandatory screenshots -> http://imgur.com/a/YiLVd

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Oh my, this got mis-filed-- sorry for the delay!

This looks great-- thank you for the MP! :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'main.qml'
2--- main.qml 2015-08-14 17:34:41 +0000
3+++ main.qml 2016-03-24 01:25:18 +0000
4@@ -1,32 +1,21 @@
5-import QtQuick 2.0
6-import Ubuntu.Components 1.1
7-import Ubuntu.Components.ListItems 0.1 as ListItem
8+import QtQuick 2.4
9+import Ubuntu.Components 1.3
10 import "ui"
11
12 MainView {
13- useDeprecatedToolbar: false
14+ id: mainView
15
16- // objectName for functional testing purposes (autopilot-qt5)
17 objectName: "mainView"
18- // Note! applicationName needs to match the "name" field of the click
19- // manifest
20 applicationName: "com.ubuntu.developer.jdstrand.permy"
21- id: mainView
22-
23- /*
24- This property enables the application to change orientation
25- when the device is rotated. The default is false.
26- */
27- automaticOrientation: true
28
29 width: units.gu(40)
30 height: units.gu(71)
31
32- // Don't use this until LP: #1372011 is fixed
33-// Component.onCompleted: Theme.name = 'Ubuntu.Components.Themes.SuruDark'
34+ Component.onCompleted: Theme.name = 'Ubuntu.Components.Themes.SuruDark'
35
36 PageStack {
37 id: pageStack
38+
39 anchors.fill: parent
40
41 Component.onCompleted: {
42@@ -36,44 +25,50 @@
43
44 Page {
45 id: apps
46- title: "Applications"
47-
48- state: "default"
49- states: [
50- PageHeadState {
51- name: "default"
52- head: apps.head
53-
54- actions: [
55- Action {
56- id: aboutAction
57- text: "About"
58- iconSource: "image://theme/help"
59- onTriggered: {
60- pageStack.push(Qt.resolvedUrl("./ui/AboutPage.qml"))
61- }
62- }
63- ]
64- }
65- ]
66+
67+ header: PageHeader {
68+ title: i18n.tr("Applications")
69+ flickable: appsList
70+ leadingActionBar {
71+ width: 0
72+ visible: false
73+ }
74+ trailingActionBar.actions: Action {
75+ id: aboutAction
76+ text: i18n.tr("About")
77+ iconName: "help"
78+ onTriggered: {
79+ pageStack.push(Qt.resolvedUrl("./ui/AboutPage.qml"))
80+ }
81+ }
82+ }
83
84 ListView {
85 id: appsList
86 objectName: "appsList"
87+
88 anchors.fill: parent
89- visible: true
90+ model: appEntry.model
91
92 AppListModel {
93 id: appEntry
94 //folder: "file://./app/tests/data"
95 folder: "file:///var/lib/apparmor/clicks"
96 }
97- model: appEntry.model
98-
99- delegate: ListItem.Subtitled {
100- text: model.appname
101- subText: 'Version: ' + model.version + '\nPackage: ' + model.pkgname
102- progression: true
103+
104+ delegate: ListItem {
105+ id: appDelegate
106+
107+ height: appDelegateLayout.height + divider.height
108+
109+ ListItemLayout {
110+ id: appDelegateLayout
111+ title.text: model.appname
112+ subtitle.text: 'Version: ' + model.version
113+ summary.text: 'Package: ' + model.pkgname
114+ ProgressionSlot{}
115+ }
116+
117 onClicked: {
118 permsList.appid = model.appid
119 permsList.profile = model.filename
120@@ -86,7 +81,12 @@
121
122 Page {
123 id: permsView
124- title: "Permissions"
125+
126+ header: PageHeader {
127+ title: i18n.tr("Permissions")
128+ flickable: permsList
129+ }
130+
131 visible: false
132
133 ListView {
134@@ -121,26 +121,35 @@
135 id: column
136 width: parent.width
137
138- ListItem.Subtitled {
139- text: "APP ID: "
140- subText: appid
141- }
142- ListItem.Subtitled {
143- text: "Policy vendor:"
144- subText: policy_vendor
145- }
146- ListItem.Subtitled {
147- text: "Policy version:"
148- subText: policy_version
149- }
150- ListItem.Subtitled {
151- text: "Policy template:"
152- subText: template
153- }
154- ListItem.Subtitled {
155- text: "Policy groups:"
156- subText: policy_groups
157- progression: (policy_groups !== "None")
158+ SubtitledListItem {
159+ title.text: "APP ID: "
160+ subtitle.text: appid
161+ }
162+ SubtitledListItem {
163+ title.text: "Policy vendor:"
164+ subtitle.text: policy_vendor
165+ }
166+ SubtitledListItem {
167+ title.text: "Policy version:"
168+ subtitle.text: policy_version
169+ }
170+ SubtitledListItem {
171+ title.text: "Policy template:"
172+ subtitle.text: template
173+ }
174+ ListItem {
175+ id: policyDelegate
176+
177+ height: policyDelegateLayout.height + divider.height
178+
179+ ListItemLayout {
180+ id: policyDelegateLayout
181+ title.text: "Policy groups:"
182+ subtitle.text: policy_groups
183+ subtitle.maximumLineCount: 3
184+ ProgressionSlot{}
185+ }
186+
187 onClicked: {
188 policyGroupsList.vendor = policy_vendor
189 policyGroupsList.version = policy_version
190@@ -150,17 +159,17 @@
191 pageStack.push(policyGroupsView)
192 }
193 }
194- ListItem.Subtitled {
195- text: "Additional abstractions:"
196- subText: abstractions
197- }
198- ListItem.Subtitled {
199- text: "Additional read paths:"
200- subText: read_path
201- }
202- ListItem.Subtitled {
203- text: "Additional write paths:"
204- subText: write_path
205+ SubtitledListItem {
206+ title.text: "Additional abstractions:"
207+ subtitle.text: abstractions
208+ }
209+ SubtitledListItem {
210+ title.text: "Additional read paths:"
211+ subtitle.text: read_path
212+ }
213+ SubtitledListItem {
214+ title.text: "Additional write paths:"
215+ subtitle.text: write_path
216 }
217 }
218 }
219@@ -168,7 +177,12 @@
220
221 Page {
222 id: policyGroupsView
223- title: "Policy Groups"
224+
225+ header: PageHeader {
226+ title: i18n.tr("Policy Groups")
227+ flickable: policyGroupsList
228+ }
229+
230 visible: false
231
232 ListView {
233@@ -209,9 +223,9 @@
234 id: column
235 width: parent.width
236
237- ListItem.Subtitled {
238- text: group + " (" + usage + ")"
239- subText: description
240+ SubtitledListItem {
241+ title.text: group + " (" + usage + ")"
242+ summary.text: description
243 }
244 }
245 }
246
247=== modified file 'manifest.json'
248--- manifest.json 2015-08-14 17:34:41 +0000
249+++ manifest.json 2016-03-24 01:25:18 +0000
250@@ -1,6 +1,7 @@
251 {
252+ "architecture": "all",
253 "description": "Easily see app permissions with Permy",
254- "framework": "ubuntu-sdk-15.04",
255+ "framework": "ubuntu-sdk-15.04.3-qml",
256 "hooks": {
257 "permy": {
258 "apparmor": "permy.apparmor",
259
260=== modified file 'ui/AboutPage.qml'
261--- ui/AboutPage.qml 2015-08-14 17:34:41 +0000
262+++ ui/AboutPage.qml 2016-03-24 01:25:18 +0000
263@@ -1,13 +1,19 @@
264-import QtQuick 2.0
265-import Ubuntu.Components 1.1
266+import QtQuick 2.4
267+import Ubuntu.Components 1.3
268
269 Page {
270- title: "About"
271 id: about
272+
273+ header: PageHeader {
274+ title: i18n.tr("About")
275+ flickable: flickable
276+ }
277+
278 anchors.fill: parent
279- width: parent.width
280
281 Flickable {
282+ id: flickable
283+
284 anchors.fill: parent
285 contentHeight: aboutColumn.height + units.gu(6)
286
287
288=== modified file 'ui/AppListModel.qml'
289--- ui/AppListModel.qml 2014-09-21 01:54:10 +0000
290+++ ui/AppListModel.qml 2016-03-24 01:25:18 +0000
291@@ -1,4 +1,4 @@
292-import QtQuick 2.0
293+import QtQuick 2.4
294 import Qt.labs.folderlistmodel 2.1
295
296 Item {
297
298=== modified file 'ui/AppModel.qml'
299--- ui/AppModel.qml 2014-09-21 04:49:50 +0000
300+++ ui/AppModel.qml 2016-03-24 01:25:18 +0000
301@@ -6,7 +6,7 @@
302 * (http://opensource.org/licenses/mit-license.php)
303 */
304
305-import QtQuick 2.0
306+import QtQuick 2.4
307 import "jsonpath.js" as JSONPath
308
309 Item {
310
311=== modified file 'ui/PolicyGroupsModel.qml'
312--- ui/PolicyGroupsModel.qml 2014-08-16 18:36:21 +0000
313+++ ui/PolicyGroupsModel.qml 2016-03-24 01:25:18 +0000
314@@ -6,7 +6,7 @@
315 * (http://opensource.org/licenses/mit-license.php)
316 */
317
318-import QtQuick 2.0
319+import QtQuick 2.4
320 import "jsonpath.js" as JSONPath
321
322 Item {
323
324=== added file 'ui/SubtitledListItem.qml'
325--- ui/SubtitledListItem.qml 1970-01-01 00:00:00 +0000
326+++ ui/SubtitledListItem.qml 2016-03-24 01:25:18 +0000
327@@ -0,0 +1,20 @@
328+import QtQuick 2.4
329+import Ubuntu.Components 1.3
330+
331+ListItem {
332+ id: listItem
333+
334+ property alias title: layout.title
335+ property alias subtitle: layout.subtitle
336+ property alias summary: layout.summary
337+
338+ height: layout.height + divider.height
339+
340+ ListItemLayout {
341+ id: layout
342+ subtitle.maximumLineCount: 2
343+ summary.wrapMode: Text.WordWrap
344+ summary.maximumLineCount: 5
345+ }
346+}
347+

Subscribers

People subscribed via source and target branches