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
diff --git a/MANIFEST.in b/MANIFEST.in
index 5533661..8631f1b 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -39,9 +39,10 @@ include plainbox/impl/providers/stubbox/units/jobs/*.pxu
39include plainbox/impl/providers/stubbox/units/testplans/*.pxu39include plainbox/impl/providers/stubbox/units/testplans/*.pxu
4040
41include plainbox/qml_shell/qml_shell.qml41include plainbox/qml_shell/qml_shell.qml
42
43include plainbox/data/plainbox-qml-modules/Plainbox/qmldir42include plainbox/data/plainbox-qml-modules/Plainbox/qmldir
44include plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml43include plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
44include plainbox/data/qml-shell/pipe_handler.py
45include plainbox/data/qml-shell/plainbox_qml_shell.qml
4546
46recursive-exclude daily-package-testing *47recursive-exclude daily-package-testing *
47recursive-include contrib *.policy48recursive-include contrib *.policy
diff --git a/plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml b/plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
index 7e2d50a..33a226b 100644
--- a/plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
+++ b/plainbox/data/plainbox-qml-modules/Plainbox/QmlJob.qml
@@ -18,8 +18,7 @@
18 * You should have received a copy of the GNU General Public License18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */20 */
21import QtQuick 2.021import QtQuick 2.5
22import Ubuntu.Components 1.3
2322
24Item {23Item {
25 signal testDone(var testResult)24 signal testDone(var testResult)
diff --git a/plainbox/data/plainbox-qml-modules/Plainbox/qmldir b/plainbox/data/plainbox-qml-modules/Plainbox/qmldir
index 04b009f..76573d0 100644
--- a/plainbox/data/plainbox-qml-modules/Plainbox/qmldir
+++ b/plainbox/data/plainbox-qml-modules/Plainbox/qmldir
@@ -1,7 +1,7 @@
1#1#
2# This file is part of Checkbox2# This file is part of Checkbox
3#3#
4# Copyright 2015 Canonical Ltd.4# Copyright 2018 Canonical Ltd.
5#5#
6# Authors:6# Authors:
7# - Maciej Kisielewski <maciej.kisielewski@canonical.com>7# - Maciej Kisielewski <maciej.kisielewski@canonical.com>
@@ -20,4 +20,4 @@
20#20#
21module Plainbox21module Plainbox
2222
23QmlJob 0.1 QmlJob.qml23QmlJob 1.0 QmlJob.qml
diff --git a/plainbox/data/qml-shell/plainbox_qml_shell.qml b/plainbox/data/qml-shell/plainbox_qml_shell.qml
index eeaa88b..84c3681 100644
--- a/plainbox/data/qml-shell/plainbox_qml_shell.qml
+++ b/plainbox/data/qml-shell/plainbox_qml_shell.qml
@@ -31,27 +31,27 @@
31 'suggestedOutcome': if outcome is 'undecided', than this suggestion will be31 'suggestedOutcome': if outcome is 'undecided', than this suggestion will be
32 presented to the user, letting them decide the final outcome of a test.32 presented to the user, letting them decide the final outcome of a test.
33*/33*/
34import QtQuick 2.034import QtQuick 2.5
35import Ubuntu.Components 1.235import QtQuick.Window 2.2
36import io.thp.pyotherside 1.236import io.thp.pyotherside 1.2
3737
38MainView {38Window {
39 id: mainView39 id: mainView
40 width: units.gu(100)40 width: 800
41 height: units.gu(75)41 height: 600
4242
43 Python {43 Python {
44 id: py44 id: py
45 Component.onCompleted: {45 Component.onCompleted: {
46 addImportPath(Qt.resolvedUrl('.'));46 addImportPath(Qt.resolvedUrl('.'));
47 py.importModule('pipe_handler', function() {47 py.importModule('pipe_handler', function() {
48 py.readAndClose(args.values['fd-in'], function(testingShellData) {48 py.readAndClose(Qt.application.arguments[8], function(testingShellData) {
49 var new_data = JSON.parse(testingShellData);49 var new_data = JSON.parse(testingShellData);
50 for (var attrname in new_data) { testingShell[attrname] = new_data[attrname]; }50 for (var attrname in new_data) { testingShell[attrname] = new_data[attrname]; }
51 testingShell.getTest = function() {51 testingShell.getTest = function() {
52 return testingShell['job_repr'];52 return testingShell['job_repr'];
53 }53 }
54 loader.setSource(args.values.job,54 loader.setSource(Qt.application.arguments[4],
55 {'testingShell': testingShell});55 {'testingShell': testingShell});
56 });56 });
57 });57 });
@@ -71,32 +71,9 @@ MainView {
71 // information and functionality passed to qml job component71 // information and functionality passed to qml job component
72 property var testingShell: {72 property var testingShell: {
73 "name": "Plainbox qml shell",73 "name": "Plainbox qml shell",
74 "pageStack": pageStack,
75 "python": py74 "python": py
76 }75 }
7776
78 Arguments {
79 id: args
80 Argument {
81 name: "job"
82 help: "QML-native job to run"
83 required: true
84 valueNames: ["PATH"]
85 }
86 Argument {
87 name: "fd-out"
88 help: "Descriptor number of pipe to write to"
89 required: false
90 valueNames: ["N"]
91 }
92 Argument {
93 name: "fd-in"
94 help: "Descriptor number of pipe to read from"
95 required: false
96 valueNames: ["N"]
97 }
98 }
99
100 Loader {77 Loader {
101 id: loader78 id: loader
102 anchors.fill: parent79 anchors.fill: parent
@@ -110,10 +87,6 @@ MainView {
11087
111 function testDone(res) {88 function testDone(res) {
112 var json_str = JSON.stringify(res) || ""89 var json_str = JSON.stringify(res) || ""
113 py.writeAndClose(json_str, args.values['fd-out'], Qt.quit);90 py.writeAndClose(json_str, Qt.application.arguments[6], Qt.quit);
114 }
115 PageStack {
116 id: pageStack
117 }91 }
118
119}92}
diff --git a/plainbox/qml_shell/qml_shell.qml b/plainbox/qml_shell/qml_shell.qml
index 9064cc4..9211bb3 100644
--- a/plainbox/qml_shell/qml_shell.qml
+++ b/plainbox/qml_shell/qml_shell.qml
@@ -31,31 +31,21 @@
31 'suggestedOutcome': if outcome is 'undecided', than this suggestion will be31 'suggestedOutcome': if outcome is 'undecided', than this suggestion will be
32 presented to the user, letting them decide the final outcome of a test.32 presented to the user, letting them decide the final outcome of a test.
33*/33*/
34import QtQuick 2.034import QtQuick 2.5
35import Ubuntu.Components 1.335import QtQuick.Window 2.2
36import io.thp.pyotherside 1.436import io.thp.pyotherside 1.4
3737
38MainView {38Window {
39 id: mainView39 id: mainView
40 width: units.gu(100)40 width: 800
41 height: units.gu(75)41 height: 600
4242
43 // information and functionality passed to qml job component43 // information and functionality passed to qml job component
44 property var testingShell: {44 property var testingShell: {
45 "name": "Standalone testing shell",45 "name": "Standalone testing shell",
46 "pageStack": pageStack,
47 "python": py46 "python": py
48 }47 }
4948
50 Arguments {
51 id: args
52 Argument {
53 name: "job"
54 help: "QML-native job to run"
55 required: true
56 valueNames: ["PATH"]
57 }
58 }
59 Python {49 Python {
60 id: py50 id: py
61 }51 }
@@ -72,10 +62,6 @@ MainView {
72 }62 }
73 }63 }
7464
75 PageStack {
76 id: pageStack
77 }
78
79 Timer {65 Timer {
80 /* because loader is constructed synchronously when the app is started,66 /* because loader is constructed synchronously when the app is started,
81 * Qt.quit() would fire a signal that engine hasn't yet connected to.67 * Qt.quit() would fire a signal that engine hasn't yet connected to.
@@ -91,6 +77,6 @@ MainView {
91 }77 }
9278
93 Component.onCompleted: {79 Component.onCompleted: {
94 loader.setSource(args.values.job, {'testingShell': testingShell});80 loader.setSource(Qt.application.arguments[4], {'testingShell': testingShell});
95 }81 }
96}82}

Subscribers

People subscribed via source and target branches