Merge lp:~unity-team/unity8/manual-qmltypes into lp:unity8

Proposed by Michał Sawicz
Status: Merged
Approved by: Michael Zanetti
Approved revision: 994
Merged at revision: 1048
Proposed branch: lp:~unity-team/unity8/manual-qmltypes
Merge into: lp:unity8
Prerequisite: lp:~nick-dedekind/unity8/move-indicator-qml
Diff against target: 183 lines (+70/-30)
5 files modified
plugins/Lights/Lights.qmltypes (+45/-0)
plugins/Powerd/Powerd.qmltypes (+7/-14)
plugins/Ubuntu/Gestures/Gestures.qmltypes (+1/-0)
tests/mocks/Powerd/Powerd.qmltypes (+7/-14)
tests/mocks/Unity/Unity.qmltypes (+10/-2)
To merge this branch: bzr merge lp:~unity-team/unity8/manual-qmltypes
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Michał Sawicz Pending
Review via email: mp+224578@code.launchpad.net

This proposal supersedes a proposal from 2014-06-26.

Commit message

Only generate .qmltypes files manually, no need to do it build-time.

It didn't work when cross-compiling either, and required builders to have otherwise unnecessary environment.

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
Prerequisite lp:~nick-dedekind/unity8/move-indicator-qml

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes.

 * Did you make sure that your branch does not contain spurious tags?
Yes.

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

We'll need to check those .qmltypes files into bzr, and copy/install them along with qmldir, so there's a bit more work involved here.

They should be generated into the source dirs, not binary.

I'll take this over tomorrow morning if you have no objections :).

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
dobey (dobey) wrote : Posted in a previous version of this proposal

On Wed, 2014-06-25 at 22:22 +0000, Michał Sawicz wrote:
> Review: Needs Fixing
>
> We'll need to check those .qmltypes files into bzr, and copy/install them along with qmldir, so there's a bit more work involved here.
>
> They should be generated into the source dirs, not binary.
>
> I'll take this over tomorrow morning if you have no objections :).

Done. :)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Looks good.

Any idea how to prevent people from changing the code and forgetting to update the qmltypes file? Could we think of a simple and fast test that verifies if they're up to date?

review: Needs Information
Revision history for this message
Michał Sawicz (saviq) wrote :

On 27.06.2014 11:07, Michael Zanetti wrote:
> Any idea how to prevent people from changing the code and forgetting to update the qmltypes file? Could we think of a simple and fast test that verifies if they're up to date?

This would probably be a pre-commit hook where we'd need to generate
them and compare to what's checked in. We should probably do a bit more
- make test, check whitespace, copyright...

Revision history for this message
dobey (dobey) wrote :

> Looks good.
>
> Any idea how to prevent people from changing the code and forgetting to update
> the qmltypes file? Could we think of a simple and fast test that verifies if
> they're up to date?

You'd need to be able to check that the API provided by the plug-in actually changed, outside of building the qmltypes file.

Maybe just add something to the review checklist and rely on that?

990. By Michał Sawicz

Merge trunk.

991. By Michał Sawicz

Merge trunk.

992. By Michał Sawicz

Update qmltypes.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Oups, this got merged with lp:~unity-team/unity8/payments-button :|

But not the whole of it, so this still needs a review.

993. By Michał Sawicz

Merge trunk

994. By Michał Sawicz

Update qmltypes.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Isn't there any ways can automate this? Doesn't need to be at build time... But reviewing such branches feels just wrong. There's no way we could possibly keep things up to date.

And no, putting it into the checklist doesn't work IMO.

review: Needs Information
Revision history for this message
Michael Zanetti (mzanetti) wrote :

approving as we need this in any case...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'plugins/Lights/Lights.qmltypes'
2--- plugins/Lights/Lights.qmltypes 1970-01-01 00:00:00 +0000
3+++ plugins/Lights/Lights.qmltypes 2014-07-10 10:59:23 +0000
4@@ -0,0 +1,45 @@
5+import QtQuick.tooling 1.1
6+
7+// This file describes the plugin-supplied types contained in the library.
8+// It is used for QML tooling purposes only.
9+//
10+// This file was auto-generated by:
11+// 'qmlplugindump -notrelocatable Lights 0.1 plugins'
12+
13+Module {
14+ Component {
15+ name: "Lights"
16+ prototype: "QObject"
17+ exports: ["Lights/Lights 0.1"]
18+ isCreatable: false
19+ isSingleton: true
20+ exportMetaObjectRevisions: [0]
21+ Enum {
22+ name: "State"
23+ values: {
24+ "Off": 0,
25+ "On": 1
26+ }
27+ }
28+ Property { name: "state"; type: "State" }
29+ Property { name: "color"; type: "QColor" }
30+ Property { name: "onMillisec"; type: "int" }
31+ Property { name: "offMillisec"; type: "int" }
32+ Signal {
33+ name: "stateChanged"
34+ Parameter { name: "newState"; type: "State" }
35+ }
36+ Signal {
37+ name: "colorChanged"
38+ Parameter { name: "color"; type: "QColor" }
39+ }
40+ Signal {
41+ name: "onMillisecChanged"
42+ Parameter { name: "onMs"; type: "int" }
43+ }
44+ Signal {
45+ name: "offMillisecChanged"
46+ Parameter { name: "offMs"; type: "int" }
47+ }
48+ }
49+}
50
51=== modified file 'plugins/Powerd/Powerd.qmltypes'
52--- plugins/Powerd/Powerd.qmltypes 2014-06-26 07:47:57 +0000
53+++ plugins/Powerd/Powerd.qmltypes 2014-07-10 10:59:23 +0000
54@@ -15,19 +15,12 @@
55 isSingleton: true
56 exportMetaObjectRevisions: [0]
57 Enum {
58- name: "DisplayFlag"
59- values: {
60- "UseProximity": 1,
61- "DisableAutoBrightness": 2,
62- "Bright": 4
63- }
64- }
65- Enum {
66- name: "DisplayFlags"
67- values: {
68- "UseProximity": 1,
69- "DisableAutoBrightness": 2,
70- "Bright": 4
71+ name: "DisplayStateChangeReason"
72+ values: {
73+ "Unknown": 0,
74+ "Inactivity": 1,
75+ "PowerKey": 2,
76+ "Proximity": 3
77 }
78 }
79 Enum {
80@@ -40,7 +33,7 @@
81 Signal {
82 name: "displayPowerStateChange"
83 Parameter { name: "status"; type: "int" }
84- Parameter { name: "flags"; type: "uint" }
85+ Parameter { name: "reason"; type: "int" }
86 }
87 }
88 }
89
90=== modified file 'plugins/Ubuntu/Gestures/Gestures.qmltypes'
91--- plugins/Ubuntu/Gestures/Gestures.qmltypes 2014-06-26 07:47:57 +0000
92+++ plugins/Ubuntu/Gestures/Gestures.qmltypes 2014-07-10 10:59:23 +0000
93@@ -141,6 +141,7 @@
94 name: "touchSceneYChanged"
95 Parameter { name: "value"; type: "double" }
96 }
97+ Signal { name: "tapped" }
98 }
99 Component {
100 name: "PressedOutsideNotifier"
101
102=== modified file 'tests/mocks/Powerd/Powerd.qmltypes'
103--- tests/mocks/Powerd/Powerd.qmltypes 2014-06-26 07:47:57 +0000
104+++ tests/mocks/Powerd/Powerd.qmltypes 2014-07-10 10:59:23 +0000
105@@ -15,19 +15,12 @@
106 isSingleton: true
107 exportMetaObjectRevisions: [0]
108 Enum {
109- name: "DisplayFlag"
110- values: {
111- "UseProximity": 1,
112- "DisableAutoBrightness": 2,
113- "Bright": 4
114- }
115- }
116- Enum {
117- name: "DisplayFlags"
118- values: {
119- "UseProximity": 1,
120- "DisableAutoBrightness": 2,
121- "Bright": 4
122+ name: "DisplayStateChangeReason"
123+ values: {
124+ "Unknown": 0,
125+ "Inactivity": 1,
126+ "PowerKey": 2,
127+ "Proximity": 3
128 }
129 }
130 Enum {
131@@ -40,7 +33,7 @@
132 Signal {
133 name: "displayPowerStateChange"
134 Parameter { name: "status"; type: "int" }
135- Parameter { name: "flags"; type: "uint" }
136+ Parameter { name: "reason"; type: "int" }
137 }
138 }
139 }
140
141=== modified file 'tests/mocks/Unity/Unity.qmltypes'
142--- tests/mocks/Unity/Unity.qmltypes 2014-06-26 07:47:57 +0000
143+++ tests/mocks/Unity/Unity.qmltypes 2014-07-10 10:59:23 +0000
144@@ -89,6 +89,10 @@
145 name: "loadDepartment"
146 Parameter { name: "id"; type: "string" }
147 }
148+ Method {
149+ name: "performQuery"
150+ Parameter { name: "query"; type: "string" }
151+ }
152 }
153 Component {
154 name: "Scopes"
155@@ -133,8 +137,8 @@
156 "RoleRawRendererTemplate": 3,
157 "RoleRenderer": 4,
158 "RoleComponents": 5,
159- "RoleResults": 6,
160- "RoleCount": 7
161+ "RoleResults": 7,
162+ "RoleCount": 8
163 }
164 }
165 Method {
166@@ -179,6 +183,9 @@
167 Component {
168 name: "unity::shell::scopes::PreviewModelInterface"
169 prototype: "QAbstractListModel"
170+ exports: ["Unity/PreviewModel 0.2"]
171+ isCreatable: false
172+ exportMetaObjectRevisions: [0]
173 Enum {
174 name: "Roles"
175 values: {
176@@ -272,6 +279,7 @@
177 Property { name: "isActive"; type: "bool" }
178 Property { name: "currentDepartmentId"; type: "string"; isReadonly: true }
179 Property { name: "hasDepartments"; type: "bool"; isReadonly: true }
180+ Property { name: "customizations"; type: "QVariantMap"; isReadonly: true }
181 Signal { name: "showDash" }
182 Signal { name: "hideDash" }
183 Signal {

Subscribers

People subscribed via source and target branches