Merge lp:~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 1055
Merged at revision: 1144
Proposed branch: lp:~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label
Merge into: lp:ubuntu-ui-toolkit/staging
Prerequisite: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/notIn
Diff against target: 230 lines (+103/-5)
9 files modified
components.api (+3/-0)
debian/control (+1/-0)
examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml (+22/-1)
modules/Ubuntu/Components/ProgressBar11.qdoc (+6/-0)
modules/Ubuntu/Components/ProgressBar11.qml (+21/-0)
modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml (+3/-1)
modules/Ubuntu/Components/qmldir (+3/-2)
tests/unit/tst_components/tst_progressbar.qml (+6/-1)
tests/unit/tst_components/tst_progressbar11.qml (+38/-0)
To merge this branch: bzr merge lp:~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+224427@code.launchpad.net

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

Commit message

Add a boolean property to allow hiding the ProgressBar label

Description of the change

Add a boolean property to allow hiding the ProgressBar label

To post a comment you must log in.
Revision history for this message
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal

You can only add this property to version 1.1 You are not allowed to add properties to 0.1 or 1.0

review: Needs Fixing
Revision history for this message
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal

Also, remove the \preliminary tag from the property declaration.

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
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal

See comments inline

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
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal

Please update components.api as well!

Also, please submit the MR agains staging, not trunk.

Anything else looks fine. Thanks!

review: Needs Fixing
Revision history for this message
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal

Almost forgot! Unit tests, please :)

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
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:1038
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/395/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/948
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/860
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/227
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/227
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/227/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/227
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1341
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1702
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1702/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8529
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/745
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1000
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1000/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/395/rebuild

review: Approve (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
Cris Dywan (kalikiana) wrote : Posted in a previous version of this proposal

FAIL! : components::TextAreaAPI::test_clear_selection_by_click_beside_selection() 'There is no text selected' returned FALSE. ()
   Loc: [/tmp/buildd/ubuntu-ui-toolkit-0.1.47+14.10.20140618bzr1043pkg0utopic1132+autopilot0/tests/unit_x11/tst_components/tst_textarea.qml(718)]

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

147 + function test_showProgressPercentageExits() {

typo: should be "test_showProgressPercentageExists"

Revision history for this message
Cris Dywan (kalikiana) wrote :

FAIL! : components::TextAreaAPI::test_clear_selection_by_click_on_selection() 'There is no selected text' returned FALSE. ()
   Loc: [/tmp/buildd/ubuntu-ui-toolkit-0.1.47+14.10.20140618bzr1045pkg0utopic1203+autopilot0/tests/unit_x11/tst_components/tst_textarea.qml(700)]

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1047
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/482/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1252
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1106
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/314
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/314
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/314/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/314
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1576
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2137
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2137/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8896
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/912
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1249
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1249/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/482/rebuild

review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

See inline comments.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1050
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/517/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1359/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1189
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/349
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/349
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/349/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/349
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1666/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2287
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2287/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9038
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/981
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1332
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1332/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/517/rebuild

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
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1052
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/552/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1579
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1352
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/384
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/384
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/384/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/384
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1856
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2576
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2576/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9313
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1119
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1516
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1516/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/552/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1053
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/557/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1617
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1372
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/389
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/389
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/389/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/389
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1890
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2633
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2633/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9372
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1138
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1539
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1539/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/557/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1055
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/570/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1785
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1502
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/402
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/402
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/402/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/402
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2048
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2855
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2855/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9590
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1258
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1689
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1689/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/570/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Looks good now, thanks!

review: Approve
Revision history for this message
Zsombor Egri (zsombi) wrote :

Looks good now, thanks!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-autolanding/238/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1856
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1554
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-autolanding/182
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-autolanding/182
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-autolanding/182/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-autolanding/182
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2120
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2952
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2952/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9695
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1302
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1744
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1744/artifact/work/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

NoSuchProcess: no process found with pid 3788
See bug 1329141

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components.api'
2--- components.api 2014-07-03 13:59:52 +0000
3+++ components.api 2014-07-10 07:36:58 +0000
4@@ -397,6 +397,9 @@
5 property real minimumValue
6 property real maximumValue
7 property real value
8+ProgressBar 1.1
9+ProgressBar
10+ property bool showProgressPercentage
11 PullToRefresh 1.1
12 StyledItem
13 readonly property bool releaseToRefresh
14
15=== modified file 'debian/control'
16--- debian/control 2014-07-10 03:24:15 +0000
17+++ debian/control 2014-07-10 07:36:58 +0000
18@@ -39,6 +39,7 @@
19 xvfb,
20 libgl1-mesa-dri,
21 locales,
22+ suru-icon-theme,
23 Standards-Version: 3.9.4
24 Homepage: https://launchpad.net/ubuntu-ui-toolkit
25 # If you aren't a member of ~ubuntu-sdk-team but need to upload packaging
26
27=== modified file 'examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml'
28--- examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2014-04-23 09:39:11 +0000
29+++ examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2014-07-10 07:36:58 +0000
30@@ -15,7 +15,7 @@
31 */
32
33 import QtQuick 2.0
34-import Ubuntu.Components 0.1
35+import Ubuntu.Components 1.1
36
37 Template {
38 objectName: "progressBarsTemplate"
39@@ -53,6 +53,27 @@
40 indeterminate: true
41 }
42 }
43+
44+ TemplateRow {
45+ title: i18n.tr("No label")
46+
47+ ProgressBar {
48+ id: progressNoLabel
49+ objectName: "progressbar_nolabel"
50+ width: parent.width
51+ showProgressPercentage: false
52+
53+ SequentialAnimation on value {
54+ loops: Animation.Infinite
55+ NumberAnimation {
56+ from: progress.minimumValue
57+ to: progress.maximumValue
58+ duration: 2000
59+ }
60+ PauseAnimation {duration: 1000}
61+ }
62+ }
63+ }
64 }
65
66 TemplateSection {
67
68=== renamed file 'modules/Ubuntu/Components/ProgressBar.qml' => 'modules/Ubuntu/Components/ProgressBar10.qml'
69=== added file 'modules/Ubuntu/Components/ProgressBar11.qdoc'
70--- modules/Ubuntu/Components/ProgressBar11.qdoc 1970-01-01 00:00:00 +0000
71+++ modules/Ubuntu/Components/ProgressBar11.qdoc 2014-07-10 07:36:58 +0000
72@@ -0,0 +1,6 @@
73+/*!
74+\qmlproperty bool ProgressBar::showProgressPercentage
75+\since Ubuntu.Components 1.1
76+
77+Specifies if the value of the progress is visible
78+*/
79
80=== added file 'modules/Ubuntu/Components/ProgressBar11.qml'
81--- modules/Ubuntu/Components/ProgressBar11.qml 1970-01-01 00:00:00 +0000
82+++ modules/Ubuntu/Components/ProgressBar11.qml 2014-07-10 07:36:58 +0000
83@@ -0,0 +1,21 @@
84+/*
85+ * Copyright 2014 Canonical Ltd.
86+ *
87+ * This program is free software; you can redistribute it and/or modify
88+ * it under the terms of the GNU Lesser General Public License as published by
89+ * the Free Software Foundation; version 3.
90+ *
91+ * This program is distributed in the hope that it will be useful,
92+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
93+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94+ * GNU Lesser General Public License for more details.
95+ *
96+ * You should have received a copy of the GNU Lesser General Public License
97+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
98+ */
99+
100+import QtQuick 2.0
101+
102+ProgressBar {
103+ property bool showProgressPercentage: true
104+}
105
106=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml'
107--- modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-04-23 08:50:20 +0000
108+++ modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-07-10 07:36:58 +0000
109@@ -20,7 +20,7 @@
110 Item {
111 id: progressBarStyle
112
113- property ProgressBar progressBar: styledItem
114+ property var progressBar: styledItem
115
116 implicitWidth: units.gu(38)
117 implicitHeight: units.gu(4)
118@@ -56,6 +56,7 @@
119 color: Theme.palette.normal.baseText
120 text: progressBar.indeterminate ? i18n.tr("In Progress")
121 : "%1%".arg(Number(progressBarStyle.progress * 100.0).toFixed(0))
122+ visible: !progressBar.hasOwnProperty("showProgressPercentage") || progressBar.showProgressPercentage
123
124 SequentialAnimation on opacity {
125 loops: Animation.Infinite
126@@ -76,5 +77,6 @@
127 rightColor: Theme.palette.normal.baseText
128 progress: (progressBarStyle.progress * background.width - valueLabel.x) / valueLabel.width
129 mirror: Qt.application.layoutDirection == Qt.RightToLeft
130+ visible: !progressBar.hasOwnProperty("showProgressPercentage") || progressBar.showProgressPercentage
131 }
132 }
133
134=== modified file 'modules/Ubuntu/Components/qmldir'
135--- modules/Ubuntu/Components/qmldir 2014-07-03 13:59:52 +0000
136+++ modules/Ubuntu/Components/qmldir 2014-07-10 07:36:58 +0000
137@@ -15,7 +15,7 @@
138 Label 0.1 Label.qml
139 AbstractButton 0.1 AbstractButton.qml
140 ActivityIndicator 0.1 ActivityIndicator.qml
141-ProgressBar 0.1 ProgressBar.qml
142+ProgressBar 0.1 ProgressBar10.qml
143 TextField 0.1 TextField.qml
144 TextArea 0.1 TextArea.qml
145 Switch 0.1 Switch.qml
146@@ -65,7 +65,7 @@
147 Label 1.0 Label.qml
148 AbstractButton 1.0 AbstractButton.qml
149 ActivityIndicator 1.0 ActivityIndicator.qml
150-ProgressBar 1.0 ProgressBar.qml
151+ProgressBar 1.0 ProgressBar10.qml
152 TextField 1.0 TextField.qml
153 TextArea 1.0 TextArea.qml
154 Switch 1.0 Switch.qml
155@@ -93,6 +93,7 @@
156
157 #version 1.1
158 ComboButton 1.1 ComboButton.qml
159+ProgressBar 1.1 ProgressBar11.qml
160 CrossFadeImage 1.1 CrossFadeImage11.qml
161 PullToRefresh 1.1 PullToRefresh.qml
162 UbuntuListView 1.1 UbuntuListView11.qml
163
164=== modified file 'tests/unit/tst_components/tst_progressbar.qml'
165--- tests/unit/tst_components/tst_progressbar.qml 2014-04-23 08:50:20 +0000
166+++ tests/unit/tst_components/tst_progressbar.qml 2014-07-10 07:36:58 +0000
167@@ -16,7 +16,8 @@
168
169 import QtQuick 2.0
170 import QtTest 1.0
171-import Ubuntu.Components 1.1
172+// Note: See tst_progressbar11.qml for the newer API tests
173+import Ubuntu.Components 1.0
174
175 TestCase {
176 name: "ProgressBarAPI"
177@@ -28,6 +29,10 @@
178 compare(progressBar.indeterminate,newIndeterminated,"can set/get")
179 }
180
181+ function test_showProgressPercentageExists() {
182+ verify(!progressBar.hasOwnProperty("showProgressPercentage"), "Property absent")
183+ }
184+
185 function test_maximumValue() {
186 compare(progressBar.maximumValue,1.0,"is set to 1.0 by default")
187 var newMaximumValue = 20.0
188
189=== added file 'tests/unit/tst_components/tst_progressbar11.qml'
190--- tests/unit/tst_components/tst_progressbar11.qml 1970-01-01 00:00:00 +0000
191+++ tests/unit/tst_components/tst_progressbar11.qml 2014-07-10 07:36:58 +0000
192@@ -0,0 +1,38 @@
193+/*
194+ * Copyright 2014 Canonical Ltd.
195+ *
196+ * This program is free software; you can redistribute it and/or modify
197+ * it under the terms of the GNU Lesser General Public License as published by
198+ * the Free Software Foundation; version 3.
199+ *
200+ * This program is distributed in the hope that it will be useful,
201+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
202+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
203+ * GNU Lesser General Public License for more details.
204+ *
205+ * You should have received a copy of the GNU Lesser General Public License
206+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
207+ */
208+
209+import QtQuick 2.0
210+import QtTest 1.0
211+import Ubuntu.Components 1.1
212+
213+TestCase {
214+ name: "ProgressBarAPI"
215+
216+ function test_showProgressPercentageExists() {
217+ verify(progressBar.hasOwnProperty("showProgressPercentage"), "Property missing")
218+ }
219+
220+ function test_noLabel() {
221+ compare(progressBar.showProgressPercentage,true, "is set by default")
222+ var newShowProgressPercentage = false
223+ progressBar.showProgressPercentage = newShowProgressPercentage
224+ compare(progressBar.showProgressPercentage, newShowProgressPercentage, "can set/get")
225+ }
226+
227+ ProgressBar {
228+ id: progressBar
229+ }
230+}

Subscribers

People subscribed via source and target branches