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
=== added file 'plugins/Lights/Lights.qmltypes'
--- plugins/Lights/Lights.qmltypes 1970-01-01 00:00:00 +0000
+++ plugins/Lights/Lights.qmltypes 2014-07-10 10:59:23 +0000
@@ -0,0 +1,45 @@
1import QtQuick.tooling 1.1
2
3// This file describes the plugin-supplied types contained in the library.
4// It is used for QML tooling purposes only.
5//
6// This file was auto-generated by:
7// 'qmlplugindump -notrelocatable Lights 0.1 plugins'
8
9Module {
10 Component {
11 name: "Lights"
12 prototype: "QObject"
13 exports: ["Lights/Lights 0.1"]
14 isCreatable: false
15 isSingleton: true
16 exportMetaObjectRevisions: [0]
17 Enum {
18 name: "State"
19 values: {
20 "Off": 0,
21 "On": 1
22 }
23 }
24 Property { name: "state"; type: "State" }
25 Property { name: "color"; type: "QColor" }
26 Property { name: "onMillisec"; type: "int" }
27 Property { name: "offMillisec"; type: "int" }
28 Signal {
29 name: "stateChanged"
30 Parameter { name: "newState"; type: "State" }
31 }
32 Signal {
33 name: "colorChanged"
34 Parameter { name: "color"; type: "QColor" }
35 }
36 Signal {
37 name: "onMillisecChanged"
38 Parameter { name: "onMs"; type: "int" }
39 }
40 Signal {
41 name: "offMillisecChanged"
42 Parameter { name: "offMs"; type: "int" }
43 }
44 }
45}
046
=== modified file 'plugins/Powerd/Powerd.qmltypes'
--- plugins/Powerd/Powerd.qmltypes 2014-06-26 07:47:57 +0000
+++ plugins/Powerd/Powerd.qmltypes 2014-07-10 10:59:23 +0000
@@ -15,19 +15,12 @@
15 isSingleton: true15 isSingleton: true
16 exportMetaObjectRevisions: [0]16 exportMetaObjectRevisions: [0]
17 Enum {17 Enum {
18 name: "DisplayFlag"18 name: "DisplayStateChangeReason"
19 values: {19 values: {
20 "UseProximity": 1,20 "Unknown": 0,
21 "DisableAutoBrightness": 2,21 "Inactivity": 1,
22 "Bright": 422 "PowerKey": 2,
23 }23 "Proximity": 3
24 }
25 Enum {
26 name: "DisplayFlags"
27 values: {
28 "UseProximity": 1,
29 "DisableAutoBrightness": 2,
30 "Bright": 4
31 }24 }
32 }25 }
33 Enum {26 Enum {
@@ -40,7 +33,7 @@
40 Signal {33 Signal {
41 name: "displayPowerStateChange"34 name: "displayPowerStateChange"
42 Parameter { name: "status"; type: "int" }35 Parameter { name: "status"; type: "int" }
43 Parameter { name: "flags"; type: "uint" }36 Parameter { name: "reason"; type: "int" }
44 }37 }
45 }38 }
46}39}
4740
=== modified file 'plugins/Ubuntu/Gestures/Gestures.qmltypes'
--- plugins/Ubuntu/Gestures/Gestures.qmltypes 2014-06-26 07:47:57 +0000
+++ plugins/Ubuntu/Gestures/Gestures.qmltypes 2014-07-10 10:59:23 +0000
@@ -141,6 +141,7 @@
141 name: "touchSceneYChanged"141 name: "touchSceneYChanged"
142 Parameter { name: "value"; type: "double" }142 Parameter { name: "value"; type: "double" }
143 }143 }
144 Signal { name: "tapped" }
144 }145 }
145 Component {146 Component {
146 name: "PressedOutsideNotifier"147 name: "PressedOutsideNotifier"
147148
=== modified file 'tests/mocks/Powerd/Powerd.qmltypes'
--- tests/mocks/Powerd/Powerd.qmltypes 2014-06-26 07:47:57 +0000
+++ tests/mocks/Powerd/Powerd.qmltypes 2014-07-10 10:59:23 +0000
@@ -15,19 +15,12 @@
15 isSingleton: true15 isSingleton: true
16 exportMetaObjectRevisions: [0]16 exportMetaObjectRevisions: [0]
17 Enum {17 Enum {
18 name: "DisplayFlag"18 name: "DisplayStateChangeReason"
19 values: {19 values: {
20 "UseProximity": 1,20 "Unknown": 0,
21 "DisableAutoBrightness": 2,21 "Inactivity": 1,
22 "Bright": 422 "PowerKey": 2,
23 }23 "Proximity": 3
24 }
25 Enum {
26 name: "DisplayFlags"
27 values: {
28 "UseProximity": 1,
29 "DisableAutoBrightness": 2,
30 "Bright": 4
31 }24 }
32 }25 }
33 Enum {26 Enum {
@@ -40,7 +33,7 @@
40 Signal {33 Signal {
41 name: "displayPowerStateChange"34 name: "displayPowerStateChange"
42 Parameter { name: "status"; type: "int" }35 Parameter { name: "status"; type: "int" }
43 Parameter { name: "flags"; type: "uint" }36 Parameter { name: "reason"; type: "int" }
44 }37 }
45 }38 }
46}39}
4740
=== modified file 'tests/mocks/Unity/Unity.qmltypes'
--- tests/mocks/Unity/Unity.qmltypes 2014-06-26 07:47:57 +0000
+++ tests/mocks/Unity/Unity.qmltypes 2014-07-10 10:59:23 +0000
@@ -89,6 +89,10 @@
89 name: "loadDepartment"89 name: "loadDepartment"
90 Parameter { name: "id"; type: "string" }90 Parameter { name: "id"; type: "string" }
91 }91 }
92 Method {
93 name: "performQuery"
94 Parameter { name: "query"; type: "string" }
95 }
92 }96 }
93 Component {97 Component {
94 name: "Scopes"98 name: "Scopes"
@@ -133,8 +137,8 @@
133 "RoleRawRendererTemplate": 3,137 "RoleRawRendererTemplate": 3,
134 "RoleRenderer": 4,138 "RoleRenderer": 4,
135 "RoleComponents": 5,139 "RoleComponents": 5,
136 "RoleResults": 6,140 "RoleResults": 7,
137 "RoleCount": 7141 "RoleCount": 8
138 }142 }
139 }143 }
140 Method {144 Method {
@@ -179,6 +183,9 @@
179 Component {183 Component {
180 name: "unity::shell::scopes::PreviewModelInterface"184 name: "unity::shell::scopes::PreviewModelInterface"
181 prototype: "QAbstractListModel"185 prototype: "QAbstractListModel"
186 exports: ["Unity/PreviewModel 0.2"]
187 isCreatable: false
188 exportMetaObjectRevisions: [0]
182 Enum {189 Enum {
183 name: "Roles"190 name: "Roles"
184 values: {191 values: {
@@ -272,6 +279,7 @@
272 Property { name: "isActive"; type: "bool" }279 Property { name: "isActive"; type: "bool" }
273 Property { name: "currentDepartmentId"; type: "string"; isReadonly: true }280 Property { name: "currentDepartmentId"; type: "string"; isReadonly: true }
274 Property { name: "hasDepartments"; type: "bool"; isReadonly: true }281 Property { name: "hasDepartments"; type: "bool"; isReadonly: true }
282 Property { name: "customizations"; type: "QVariantMap"; isReadonly: true }
275 Signal { name: "showDash" }283 Signal { name: "showDash" }
276 Signal { name: "hideDash" }284 Signal { name: "hideDash" }
277 Signal {285 Signal {

Subscribers

People subscribed via source and target branches