Merge ~sylvain-pineau/checkbox-ng:qtquick-only into checkbox-ng:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: e8e2e49c0b49bfaffde77130959ca0a54b5895e9
Merged at revision: 982ed8b0362f82c2d5b56f9059d3b54378241fba
Proposed branch: ~sylvain-pineau/checkbox-ng:qtquick-only
Merge into: checkbox-ng:master
Diff against target: 193 lines (+19/-60)
5 files modified
MANIFEST.in (+2/-1)
plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml (+1/-2)
plainbox/data/plainbox-qml-modules/Plainbox/qmldir (+2/-2)
plainbox/data/qml-shell/plainbox_qml_shell.qml (+8/-35)
plainbox/qml_shell/qml_shell.qml (+6/-20)
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+337664@code.launchpad.net

Description of the change

Ubuntu QML Components are deprecated and we have to exclusively rely on QtQuick only for QML jobs.

This MR updates the checkbox side, a follow-up MR will take care of p-p-checkbox.

Tested using an upcoming version of checkbox-oem-qa snap with the following stage packages added to the checkbox provider.

      - qml-module-qtquick-layouts
      - qml-module-qtquick-controls
      - pyotherside

And a new qmlscene part:

  qmlscene:
    plugin: nil
    stage-packages:
      - qmlscene
    organize:
      'usr/lib/*/qt5/bin/*': bin/

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

Seems ok so +1, but is there any reason to keep it at all?

review: Approve
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

We still have a couple of jobs that rely on QML such has touchscreen tests (e.g multitouch) and the beautiful palm rejection test written by Maciej.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/MANIFEST.in b/MANIFEST.in
2index 5533661..8631f1b 100644
3--- a/MANIFEST.in
4+++ b/MANIFEST.in
5@@ -39,9 +39,10 @@ include plainbox/impl/providers/stubbox/units/jobs/*.pxu
6 include plainbox/impl/providers/stubbox/units/testplans/*.pxu
7
8 include plainbox/qml_shell/qml_shell.qml
9-
10 include plainbox/data/plainbox-qml-modules/Plainbox/qmldir
11 include plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
12+include plainbox/data/qml-shell/pipe_handler.py
13+include plainbox/data/qml-shell/plainbox_qml_shell.qml
14
15 recursive-exclude daily-package-testing *
16 recursive-include contrib *.policy
17diff --git a/plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml b/plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
18index 7e2d50a..33a226b 100644
19--- a/plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
20+++ b/plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
21@@ -18,8 +18,7 @@
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 */
25-import QtQuick 2.0
26-import Ubuntu.Components 1.3
27+import QtQuick 2.5
28
29 Item {
30 signal testDone(var testResult)
31diff --git a/plainbox/data/plainbox-qml-modules/Plainbox/qmldir b/plainbox/data/plainbox-qml-modules/Plainbox/qmldir
32index 04b009f..76573d0 100644
33--- a/plainbox/data/plainbox-qml-modules/Plainbox/qmldir
34+++ b/plainbox/data/plainbox-qml-modules/Plainbox/qmldir
35@@ -1,7 +1,7 @@
36 #
37 # This file is part of Checkbox
38 #
39-# Copyright 2015 Canonical Ltd.
40+# Copyright 2018 Canonical Ltd.
41 #
42 # Authors:
43 # - Maciej Kisielewski <maciej.kisielewski@canonical.com>
44@@ -20,4 +20,4 @@
45 #
46 module Plainbox
47
48-QmlJob 0.1 QmlJob.qml
49+QmlJob 1.0 QmlJob.qml
50diff --git a/plainbox/data/qml-shell/plainbox_qml_shell.qml b/plainbox/data/qml-shell/plainbox_qml_shell.qml
51index eeaa88b..84c3681 100644
52--- a/plainbox/data/qml-shell/plainbox_qml_shell.qml
53+++ b/plainbox/data/qml-shell/plainbox_qml_shell.qml
54@@ -31,27 +31,27 @@
55 'suggestedOutcome': if outcome is 'undecided', than this suggestion will be
56 presented to the user, letting them decide the final outcome of a test.
57 */
58-import QtQuick 2.0
59-import Ubuntu.Components 1.2
60+import QtQuick 2.5
61+import QtQuick.Window 2.2
62 import io.thp.pyotherside 1.2
63
64-MainView {
65+Window {
66 id: mainView
67- width: units.gu(100)
68- height: units.gu(75)
69+ width: 800
70+ height: 600
71
72 Python {
73 id: py
74 Component.onCompleted: {
75 addImportPath(Qt.resolvedUrl('.'));
76 py.importModule('pipe_handler', function() {
77- py.readAndClose(args.values['fd-in'], function(testingShellData) {
78+ py.readAndClose(Qt.application.arguments[8], function(testingShellData) {
79 var new_data = JSON.parse(testingShellData);
80 for (var attrname in new_data) { testingShell[attrname] = new_data[attrname]; }
81 testingShell.getTest = function() {
82 return testingShell['job_repr'];
83 }
84- loader.setSource(args.values.job,
85+ loader.setSource(Qt.application.arguments[4],
86 {'testingShell': testingShell});
87 });
88 });
89@@ -71,32 +71,9 @@ MainView {
90 // information and functionality passed to qml job component
91 property var testingShell: {
92 "name": "Plainbox qml shell",
93- "pageStack": pageStack,
94 "python": py
95 }
96
97- Arguments {
98- id: args
99- Argument {
100- name: "job"
101- help: "QML-native job to run"
102- required: true
103- valueNames: ["PATH"]
104- }
105- Argument {
106- name: "fd-out"
107- help: "Descriptor number of pipe to write to"
108- required: false
109- valueNames: ["N"]
110- }
111- Argument {
112- name: "fd-in"
113- help: "Descriptor number of pipe to read from"
114- required: false
115- valueNames: ["N"]
116- }
117- }
118-
119 Loader {
120 id: loader
121 anchors.fill: parent
122@@ -110,10 +87,6 @@ MainView {
123
124 function testDone(res) {
125 var json_str = JSON.stringify(res) || ""
126- py.writeAndClose(json_str, args.values['fd-out'], Qt.quit);
127- }
128- PageStack {
129- id: pageStack
130+ py.writeAndClose(json_str, Qt.application.arguments[6], Qt.quit);
131 }
132-
133 }
134diff --git a/plainbox/qml_shell/qml_shell.qml b/plainbox/qml_shell/qml_shell.qml
135index 9064cc4..9211bb3 100644
136--- a/plainbox/qml_shell/qml_shell.qml
137+++ b/plainbox/qml_shell/qml_shell.qml
138@@ -31,31 +31,21 @@
139 'suggestedOutcome': if outcome is 'undecided', than this suggestion will be
140 presented to the user, letting them decide the final outcome of a test.
141 */
142-import QtQuick 2.0
143-import Ubuntu.Components 1.3
144+import QtQuick 2.5
145+import QtQuick.Window 2.2
146 import io.thp.pyotherside 1.4
147
148-MainView {
149+Window {
150 id: mainView
151- width: units.gu(100)
152- height: units.gu(75)
153+ width: 800
154+ height: 600
155
156 // information and functionality passed to qml job component
157 property var testingShell: {
158 "name": "Standalone testing shell",
159- "pageStack": pageStack,
160 "python": py
161 }
162
163- Arguments {
164- id: args
165- Argument {
166- name: "job"
167- help: "QML-native job to run"
168- required: true
169- valueNames: ["PATH"]
170- }
171- }
172 Python {
173 id: py
174 }
175@@ -72,10 +62,6 @@ MainView {
176 }
177 }
178
179- PageStack {
180- id: pageStack
181- }
182-
183 Timer {
184 /* because loader is constructed synchronously when the app is started,
185 * Qt.quit() would fire a signal that engine hasn't yet connected to.
186@@ -91,6 +77,6 @@ MainView {
187 }
188
189 Component.onCompleted: {
190- loader.setSource(args.values.job, {'testingShell': testingShell});
191+ loader.setSource(Qt.application.arguments[4], {'testingShell': testingShell});
192 }
193 }

Subscribers

People subscribed via source and target branches