Merge lp:~mzanetti/unity8/move-style-to-components into lp:unity8

Proposed by Michael Zanetti
Status: Rejected
Rejected by: Michael Zanetti
Proposed branch: lp:~mzanetti/unity8/move-style-to-components
Merge into: lp:unity8
Diff against target: 127 lines (+5/-45)
7 files modified
plugins/Utils/qmldir (+0/-1)
qml/Components/Background.qml (+3/-3)
qml/Dash/DashPageHeader.qml (+1/-0)
tests/mocks/Utils/Style.js (+0/-37)
tests/mocks/Utils/qmldir (+0/-1)
tests/plugins/Utils/CMakeLists.txt (+0/-3)
tests/qmltests/CMakeLists.txt (+1/-0)
To merge this branch: bzr merge lp:~mzanetti/unity8/move-style-to-components
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Disapprove
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+307746@code.launchpad.net

Commit message

Move style to components.

No need for this to be a plugin, and the test for it breaks the arm64 builders.

Description of the change

Descriptions make CI happy :)

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2657
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2322/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2322/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2657
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2326/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2326/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2657
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2327/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2327/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2657
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2329/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3066
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1713
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1713
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1713
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3094
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2951/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2951/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2951/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2951/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2951/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2951/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2951/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2951/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2951
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2951/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2329/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

this won't work

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

plugins/Dash/ needs it and can't access it when it's in Components

Unmerged revisions

2657. By Michael Zanetti

move Style to components, no reason it needs to be a plugin and it breaks the arm64 builders

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Utils/qmldir'
2--- plugins/Utils/qmldir 2015-11-24 17:44:18 +0000
3+++ plugins/Utils/qmldir 2016-10-05 17:10:50 +0000
4@@ -1,5 +1,4 @@
5 module Utils
6 plugin Utils-qml
7 typeinfo Utils.qmltypes
8-Style 0.1 Style.js
9 singleton EdgeBarrierSettings 0.1 EdgeBarrierSettings.qml
10
11=== modified file 'qml/Components/Background.qml'
12--- qml/Components/Background.qml 2015-07-15 15:07:19 +0000
13+++ qml/Components/Background.qml 2016-10-05 17:10:50 +0000
14@@ -16,7 +16,7 @@
15
16 import QtQuick 2.4
17 import Ubuntu.Components 1.3
18-import Utils 0.1 as Utils
19+import "Style.js" as Style
20
21 Loader {
22 id: root
23@@ -27,8 +27,8 @@
24 .match(/^(color|gradient):\/\/\/(?:(#(?:[0-9a-f]{3,4}){1,2}|[a-z]{3,}))(?:\/(#(?:[0-9a-f]{3,4}){1,2}|[a-z]{3,}))?\/?$/i)
25 readonly property var luminance: {
26 if (!parsedStyle) return 0.5;
27- if (parsedStyle[1] === "color") return Utils.Style.luminance(parsedStyle[2]);
28- else if (parsedStyle[1] === "gradient") return Utils.Style.luminance(parsedStyle[2], parsedStyle[3]);
29+ if (parsedStyle[1] === "color") return Style.luminance(parsedStyle[2]);
30+ else if (parsedStyle[1] === "gradient") return Style.luminance(parsedStyle[2], parsedStyle[3]);
31 }
32
33 // FIXME this is only here for highlight purposes (see DashNavigation.qml, too)
34
35=== renamed file 'plugins/Utils/Style.js' => 'qml/Components/Style.js'
36=== modified file 'qml/Dash/DashPageHeader.qml'
37--- qml/Dash/DashPageHeader.qml 2016-08-16 14:06:26 +0000
38+++ qml/Dash/DashPageHeader.qml 2016-10-05 17:10:50 +0000
39@@ -20,6 +20,7 @@
40 import Ubuntu.Components.ListItems 1.3
41 import Utils 0.1
42 import "../Components"
43+import "../Components/Style.js" as Style
44
45 Item {
46 id: root
47
48=== removed file 'tests/mocks/Utils/Style.js'
49--- tests/mocks/Utils/Style.js 2015-03-04 13:04:58 +0000
50+++ tests/mocks/Utils/Style.js 1970-01-01 00:00:00 +0000
51@@ -1,37 +0,0 @@
52-/*
53- * Copyright (C) 2014 Canonical, Ltd.
54- *
55- * This program is free software; you can redistribute it and/or modify
56- * it under the terms of the GNU General Public License as published by
57- * the Free Software Foundation; version 3.
58- *
59- * This program is distributed in the hope that it will be useful,
60- * but WITHOUT ANY WARRANTY; without even the implied warranty of
61- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62- * GNU General Public License for more details.
63- *
64- * You should have received a copy of the GNU General Public License
65- * along with this program. If not, see <http://www.gnu.org/licenses/>.
66- */
67-
68-.pragma library
69-
70-/*! \brief Calculate average luminance of the passed colors
71-
72- \note If not fully opaque, luminance is dependant on blending.
73- */
74-function luminance() {
75- var sum = 0;
76- // TODO this was originally
77- // for (var k in arguments) {
78- // but for some unkown reason was causing crashes in testDash/testDashContent
79- // investigate when we have some time
80- for (var k = 0; k < arguments.length; ++k) {
81- // only way to convert string to color
82- var c = Qt.lighter(arguments[k], 1.0);
83-
84- sum += 0.2126 * c.r + 0.7152 * c.g + 0.0722 * c.b;
85- }
86-
87- return sum / arguments.length;
88-}
89
90=== modified file 'tests/mocks/Utils/qmldir'
91--- tests/mocks/Utils/qmldir 2015-12-03 15:40:07 +0000
92+++ tests/mocks/Utils/qmldir 2016-10-05 17:10:50 +0000
93@@ -1,6 +1,5 @@
94 module Utils
95 plugin FakeUtils-qml
96 typeinfo Utils.qmltypes
97-Style 0.1 Style.js
98 WindowInputMonitor 0.1 WindowInputMonitor.qml
99 singleton EdgeBarrierSettings 0.1 EdgeBarrierSettings.qml
100
101=== modified file 'tests/plugins/Utils/CMakeLists.txt'
102--- tests/plugins/Utils/CMakeLists.txt 2016-06-28 20:38:00 +0000
103+++ tests/plugins/Utils/CMakeLists.txt 2016-10-05 17:10:50 +0000
104@@ -21,9 +21,6 @@
105
106 endforeach()
107
108-# plain qml test
109-add_unity8_qmlunittest(. UtilsStyle)
110-
111 # URLDispatcher test needs dbus-test-runner because it claims a dbus name
112 add_executable(URLDispatcherTestExec URLDispatcherTest.cpp)
113 qt5_use_modules(URLDispatcherTestExec Test Core Qml)
114
115=== modified file 'tests/qmltests/CMakeLists.txt'
116--- tests/qmltests/CMakeLists.txt 2016-08-22 15:39:16 +0000
117+++ tests/qmltests/CMakeLists.txt 2016-10-05 17:10:50 +0000
118@@ -20,6 +20,7 @@
119 add_unity8_qmltest(Components ResponsiveVerticalJournal)
120 add_unity8_qmltest(Components SharingPicker)
121 add_unity8_qmltest(Components Showable)
122+add_unity8_qmltest(Components UtilsStyle)
123 add_unity8_qmltest(Components VirtualTouchPad)
124 add_unity8_qmltest(Components WallpaperResolver)
125 add_unity8_qmltest(Components ZoomableImage)
126
127=== renamed file 'tests/plugins/Utils/tst_UtilsStyle.qml' => 'tests/qmltests/Components/tst_UtilsStyle.qml'

Subscribers

People subscribed via source and target branches