Merge lp:~faenil/ubuntu-ui-toolkit/listitemlayout_lp1514173 into lp:ubuntu-ui-toolkit/staging
- listitemlayout_lp1514173
- Merge into staging
Status: | Merged |
---|---|
Approved by: | Zsombor Egri |
Approved revision: | 1716 |
Merged at revision: | 1711 |
Proposed branch: | lp:~faenil/ubuntu-ui-toolkit/listitemlayout_lp1514173 |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Diff against target: |
314 lines (+83/-29) 10 files modified
components.api (+1/-0) examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml (+8/-8) examples/ubuntu-ui-toolkit-gallery/ListItemWithLabel.qml (+1/-1) src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp (+3/-3) src/Ubuntu/Components/plugin/uclistitemlayout.cpp (+20/-11) src/Ubuntu/Components/plugin/uclistitemlayout.h (+2/-1) src/Ubuntu/Components/plugin/ucslotslayout.cpp (+10/-2) src/Ubuntu/Components/plugin/ucslotslayout.h (+3/-2) src/Ubuntu/Test/UbuntuTestCase.qml (+5/-0) tests/unit_x11/tst_components/tst_slotslayout.qml (+30/-1) |
To merge this branch: | bzr merge lp:~faenil/ubuntu-ui-toolkit/listitemlayout_lp1514173 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zsombor Egri | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+276942@code.launchpad.net |
Commit message
ListItemLayout: set QML context of the predefined labels. Fixes lp1514173
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
- 1711. By Andrea Bernabei
-
slotslayout test: add ignoreWarning to qml context test
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1711
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1712. By Andrea Bernabei
-
update components.api
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1712
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1713. By Andrea Bernabei
-
ListItemLayout: allocate default mainSlot in its getter. Fixes qmlplugindump crash.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1713
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1714. By Andrea Bernabei
-
UbuntuTestCase: add documentation for testUtil property
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1714
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Zsombor Egri (zsombi) wrote : | # |
A small comment, and we're good.
- 1715. By Andrea Bernabei
-
ListItemLayout: don't fire mainSlotChanged when setting the default main slot
- 1716. By Andrea Bernabei
-
UI toolkit gallery: fix height of ListItems in ListItemLayouts page
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1716
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Zsombor Egri (zsombi) wrote : | # |
Good to go now. Thanks for the fix!!!
Preview Diff
1 | === modified file 'components.api' | |||
2 | --- components.api 2015-11-09 16:03:08 +0000 | |||
3 | +++ components.api 2015-11-10 11:54:07 +0000 | |||
4 | @@ -1521,6 +1521,7 @@ | |||
5 | 1521 | function var typeString(var string) | 1521 | function var typeString(var string) |
6 | 1522 | function var warningFormat(var line, var column, var message) | 1522 | function var warningFormat(var line, var column, var message) |
7 | 1523 | function var waitForHeaderAnimation(var mainView) | 1523 | function var waitForHeaderAnimation(var mainView) |
8 | 1524 | readonly property QuickTestUtil testUtil | ||
9 | 1524 | Ubuntu.Components.UriHandler 1.0 0.1: QtObject singleton | 1525 | Ubuntu.Components.UriHandler 1.0 0.1: QtObject singleton |
10 | 1525 | signal opened(QStringList uris) | 1526 | signal opened(QStringList uris) |
11 | 1526 | Ubuntu.Components.ListItems.ValueSelector 1.0 0.1: Empty | 1527 | Ubuntu.Components.ListItems.ValueSelector 1.0 0.1: Empty |
12 | 1527 | 1528 | ||
13 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml' | |||
14 | --- examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2015-09-30 21:14:25 +0000 | |||
15 | +++ examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2015-11-10 11:54:07 +0000 | |||
16 | @@ -28,7 +28,7 @@ | |||
17 | 28 | 28 | ||
18 | 29 | ListItem { | 29 | ListItem { |
19 | 30 | id: addressbookListItem | 30 | id: addressbookListItem |
21 | 31 | height: addressbookLayout.height | 31 | height: addressbookLayout.height + (divider.visible ? divider.height : 0) |
22 | 32 | 32 | ||
23 | 33 | ListItemLayout { | 33 | ListItemLayout { |
24 | 34 | id: addressbookLayout | 34 | id: addressbookLayout |
25 | @@ -48,7 +48,7 @@ | |||
26 | 48 | 48 | ||
27 | 49 | ListItem { | 49 | ListItem { |
28 | 50 | id: addressbookDetailsListItem | 50 | id: addressbookDetailsListItem |
30 | 51 | height: addressbookDetailsLayout.height + divider.height | 51 | height: addressbookDetailsLayout.height + (divider.visible ? divider.height : 0) |
31 | 52 | ListItemLayout { | 52 | ListItemLayout { |
32 | 53 | id: addressbookDetailsLayout | 53 | id: addressbookDetailsLayout |
33 | 54 | 54 | ||
34 | @@ -73,7 +73,7 @@ | |||
35 | 73 | ListItem { | 73 | ListItem { |
36 | 74 | id: telegramContactsListItem | 74 | id: telegramContactsListItem |
37 | 75 | 75 | ||
39 | 76 | height: telegramContactsLayout.height | 76 | height: telegramContactsLayout.height + (divider.visible ? divider.height : 0) |
40 | 77 | 77 | ||
41 | 78 | ListItemLayout { | 78 | ListItemLayout { |
42 | 79 | id: telegramContactsLayout | 79 | id: telegramContactsLayout |
43 | @@ -92,7 +92,7 @@ | |||
44 | 92 | 92 | ||
45 | 93 | ListItem { | 93 | ListItem { |
46 | 94 | id: systemSettings1 | 94 | id: systemSettings1 |
48 | 95 | height: systemSettings1_layout.height | 95 | height: systemSettings1_layout.height + (divider.visible ? divider.height : 0) |
49 | 96 | 96 | ||
50 | 97 | ListItemLayout { | 97 | ListItemLayout { |
51 | 98 | id: systemSettings1_layout | 98 | id: systemSettings1_layout |
52 | @@ -110,7 +110,7 @@ | |||
53 | 110 | 110 | ||
54 | 111 | ListItem { | 111 | ListItem { |
55 | 112 | id: systemSettings2 | 112 | id: systemSettings2 |
57 | 113 | height: systemSettings2_layout.height | 113 | height: systemSettings2_layout.height + (divider.visible ? divider.height : 0) |
58 | 114 | 114 | ||
59 | 115 | ListItemLayout { | 115 | ListItemLayout { |
60 | 116 | id: systemSettings2_layout | 116 | id: systemSettings2_layout |
61 | @@ -129,7 +129,7 @@ | |||
62 | 129 | 129 | ||
63 | 130 | ListItem { | 130 | ListItem { |
64 | 131 | id: systemSettings3 | 131 | id: systemSettings3 |
66 | 132 | height: systemSettings3_layout.height | 132 | height: systemSettings3_layout.height + (divider.visible ? divider.height : 0) |
67 | 133 | 133 | ||
68 | 134 | ListItemLayout { | 134 | ListItemLayout { |
69 | 135 | id: systemSettings3_layout | 135 | id: systemSettings3_layout |
70 | @@ -157,7 +157,7 @@ | |||
71 | 157 | spacing: 0 | 157 | spacing: 0 |
72 | 158 | 158 | ||
73 | 159 | ListItem { | 159 | ListItem { |
75 | 160 | height: customLabelsLayout.height | 160 | height: customLabelsLayout.height + (divider.visible ? divider.height : 0) |
76 | 161 | 161 | ||
77 | 162 | ListItemLayout { | 162 | ListItemLayout { |
78 | 163 | id: customLabelsLayout | 163 | id: customLabelsLayout |
79 | @@ -220,7 +220,7 @@ | |||
80 | 220 | 220 | ||
81 | 221 | ListItem { | 221 | ListItem { |
82 | 222 | id: dialerHistoryListItem | 222 | id: dialerHistoryListItem |
84 | 223 | height: dialerHistoryLayout.height | 223 | height: dialerHistoryLayout.height + (divider.visible ? divider.height : 0) |
85 | 224 | 224 | ||
86 | 225 | ListItemLayout { | 225 | ListItemLayout { |
87 | 226 | id: dialerHistoryLayout | 226 | id: dialerHistoryLayout |
88 | 227 | 227 | ||
89 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemWithLabel.qml' | |||
90 | --- examples/ubuntu-ui-toolkit-gallery/ListItemWithLabel.qml 2015-09-28 12:26:13 +0000 | |||
91 | +++ examples/ubuntu-ui-toolkit-gallery/ListItemWithLabel.qml 2015-11-10 11:54:07 +0000 | |||
92 | @@ -20,7 +20,7 @@ | |||
93 | 20 | ListItem { | 20 | ListItem { |
94 | 21 | property alias title: layout.title | 21 | property alias title: layout.title |
95 | 22 | 22 | ||
97 | 23 | height: layout.height | 23 | height: layout.height + (divider.visible ? divider.height : 0) |
98 | 24 | onPressAndHold: selectMode = !selectMode | 24 | onPressAndHold: selectMode = !selectMode |
99 | 25 | 25 | ||
100 | 26 | ListItemLayout { id: layout } | 26 | ListItemLayout { id: layout } |
101 | 27 | 27 | ||
102 | === modified file 'src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp' | |||
103 | --- src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp 2015-10-12 14:32:17 +0000 | |||
104 | +++ src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp 2015-11-10 11:54:07 +0000 | |||
105 | @@ -143,7 +143,7 @@ | |||
106 | 143 | Q_D(UCThreeLabelsSlot); | 143 | Q_D(UCThreeLabelsSlot); |
107 | 144 | if (d->m_title == Q_NULLPTR) { | 144 | if (d->m_title == Q_NULLPTR) { |
108 | 145 | d->m_title = new UCLabel(this); | 145 | d->m_title = new UCLabel(this); |
110 | 146 | QQmlData::get(d->m_title, true); | 146 | QQmlEngine::setContextForObject(d->m_title, qmlContext(this)); |
111 | 147 | d->m_title->init(); | 147 | d->m_title->init(); |
112 | 148 | 148 | ||
113 | 149 | QQuickAnchors *titleAnchors = QQuickItemPrivate::get(d->m_title)->anchors(); | 149 | QQuickAnchors *titleAnchors = QQuickItemPrivate::get(d->m_title)->anchors(); |
114 | @@ -180,7 +180,7 @@ | |||
115 | 180 | Q_D(UCThreeLabelsSlot); | 180 | Q_D(UCThreeLabelsSlot); |
116 | 181 | if (d->m_subtitle == Q_NULLPTR) { | 181 | if (d->m_subtitle == Q_NULLPTR) { |
117 | 182 | d->m_subtitle = new UCLabel(this); | 182 | d->m_subtitle = new UCLabel(this); |
119 | 183 | QQmlData::get(d->m_subtitle, true); | 183 | QQmlEngine::setContextForObject(d->m_subtitle, qmlContext(this)); |
120 | 184 | d->m_subtitle->init(); | 184 | d->m_subtitle->init(); |
121 | 185 | 185 | ||
122 | 186 | QQuickAnchors *subtitleAnchors = QQuickItemPrivate::get(d->m_subtitle)->anchors(); | 186 | QQuickAnchors *subtitleAnchors = QQuickItemPrivate::get(d->m_subtitle)->anchors(); |
123 | @@ -202,7 +202,7 @@ | |||
124 | 202 | Q_D(UCThreeLabelsSlot); | 202 | Q_D(UCThreeLabelsSlot); |
125 | 203 | if (d->m_summary == Q_NULLPTR) { | 203 | if (d->m_summary == Q_NULLPTR) { |
126 | 204 | d->m_summary = new UCLabel(this); | 204 | d->m_summary = new UCLabel(this); |
128 | 205 | QQmlData::get(d->m_summary, true); | 205 | QQmlEngine::setContextForObject(d->m_summary, qmlContext(this)); |
129 | 206 | d->m_summary->init(); | 206 | d->m_summary->init(); |
130 | 207 | 207 | ||
131 | 208 | QQuickAnchors *summaryAnchors = QQuickItemPrivate::get(d->m_summary)->anchors(); | 208 | QQuickAnchors *summaryAnchors = QQuickItemPrivate::get(d->m_summary)->anchors(); |
132 | 209 | 209 | ||
133 | === modified file 'src/Ubuntu/Components/plugin/uclistitemlayout.cpp' | |||
134 | --- src/Ubuntu/Components/plugin/uclistitemlayout.cpp 2015-10-01 08:47:31 +0000 | |||
135 | +++ src/Ubuntu/Components/plugin/uclistitemlayout.cpp 2015-11-10 11:54:07 +0000 | |||
136 | @@ -212,16 +212,7 @@ | |||
137 | 212 | UCListItemLayout::UCListItemLayout(QQuickItem *parent) | 212 | UCListItemLayout::UCListItemLayout(QQuickItem *parent) |
138 | 213 | : UCSlotsLayout(parent) | 213 | : UCSlotsLayout(parent) |
139 | 214 | { | 214 | { |
150 | 215 | //don't set the parent, we have to create qqmldata first | 215 | |
141 | 216 | UCThreeLabelsSlot *main = new UCThreeLabelsSlot(); | ||
142 | 217 | |||
143 | 218 | //create QML data for mainSlot otherwise qmlAttachedProperties | ||
144 | 219 | //calls in SlotsLayout will fail | ||
145 | 220 | QQmlData::get(main, true); | ||
146 | 221 | main->setParent(this); | ||
147 | 222 | |||
148 | 223 | //this will also set the parentItem | ||
149 | 224 | UCSlotsLayout::setMainSlot(main); | ||
151 | 225 | } | 216 | } |
152 | 226 | 217 | ||
153 | 227 | /*! | 218 | /*! |
154 | @@ -269,7 +260,25 @@ | |||
155 | 269 | return qobject_cast<UCThreeLabelsSlot *>(mainSlot())->summary(); | 260 | return qobject_cast<UCThreeLabelsSlot *>(mainSlot())->summary(); |
156 | 270 | } | 261 | } |
157 | 271 | 262 | ||
159 | 272 | void UCListItemLayout::setMainSlot(QQuickItem *slot) { | 263 | QQuickItem *UCListItemLayout::mainSlot() { |
160 | 264 | if (UCSlotsLayout::mainSlot() == Q_NULLPTR) { | ||
161 | 265 | //don't set the parent, we have to create qqmldata first | ||
162 | 266 | UCThreeLabelsSlot *main = new UCThreeLabelsSlot(); | ||
163 | 267 | |||
164 | 268 | //create QML data for mainSlot otherwise qmlAttachedProperties | ||
165 | 269 | //calls in SlotsLayout will fail (setContextForObject will create the QQmlData) | ||
166 | 270 | QQmlEngine::setContextForObject(main, qmlContext(this)); | ||
167 | 271 | main->setParent(this); | ||
168 | 272 | |||
169 | 273 | //this will also set the parentItem | ||
170 | 274 | UCSlotsLayout::setMainSlot(main, false); | ||
171 | 275 | } | ||
172 | 276 | |||
173 | 277 | return UCSlotsLayout::mainSlot(); | ||
174 | 278 | } | ||
175 | 279 | |||
176 | 280 | void UCListItemLayout::setMainSlot(QQuickItem *slot, bool fireSignal) { | ||
177 | 273 | Q_UNUSED(slot); | 281 | Q_UNUSED(slot); |
178 | 282 | Q_UNUSED(fireSignal); | ||
179 | 274 | qmlInfo(this) << "Setting a different mainSlot on ListItemLayout is not supported. Please use SlotsLayout instead."; | 283 | qmlInfo(this) << "Setting a different mainSlot on ListItemLayout is not supported. Please use SlotsLayout instead."; |
180 | 275 | } | 284 | } |
181 | 276 | 285 | ||
182 | === modified file 'src/Ubuntu/Components/plugin/uclistitemlayout.h' | |||
183 | --- src/Ubuntu/Components/plugin/uclistitemlayout.h 2015-09-30 15:53:49 +0000 | |||
184 | +++ src/Ubuntu/Components/plugin/uclistitemlayout.h 2015-11-10 11:54:07 +0000 | |||
185 | @@ -30,9 +30,10 @@ | |||
186 | 30 | public: | 30 | public: |
187 | 31 | explicit UCListItemLayout(QQuickItem *parent = 0); | 31 | explicit UCListItemLayout(QQuickItem *parent = 0); |
188 | 32 | 32 | ||
189 | 33 | QQuickItem *mainSlot() override; | ||
190 | 33 | //we don't allow changing the main slot on ListItemLayout because otherwise | 34 | //we don't allow changing the main slot on ListItemLayout because otherwise |
191 | 34 | //accessing title/subtitle/summary would lead to a crash | 35 | //accessing title/subtitle/summary would lead to a crash |
193 | 35 | void setMainSlot(QQuickItem *slot) override; | 36 | void setMainSlot(QQuickItem *slot, bool fireSignal = true) override; |
194 | 36 | 37 | ||
195 | 37 | UCLabel *title(); | 38 | UCLabel *title(); |
196 | 38 | UCLabel *subtitle(); | 39 | UCLabel *subtitle(); |
197 | 39 | 40 | ||
198 | === modified file 'src/Ubuntu/Components/plugin/ucslotslayout.cpp' | |||
199 | --- src/Ubuntu/Components/plugin/ucslotslayout.cpp 2015-10-12 14:32:17 +0000 | |||
200 | +++ src/Ubuntu/Components/plugin/ucslotslayout.cpp 2015-11-10 11:54:07 +0000 | |||
201 | @@ -990,13 +990,18 @@ | |||
202 | 990 | } | 990 | } |
203 | 991 | \endqml | 991 | \endqml |
204 | 992 | */ | 992 | */ |
205 | 993 | QQuickItem *UCSlotsLayout::mainSlot() | ||
206 | 994 | { | ||
207 | 995 | Q_D(const UCSlotsLayout); | ||
208 | 996 | return d->mainSlot; | ||
209 | 997 | } | ||
210 | 993 | QQuickItem *UCSlotsLayout::mainSlot() const | 998 | QQuickItem *UCSlotsLayout::mainSlot() const |
211 | 994 | { | 999 | { |
212 | 995 | Q_D(const UCSlotsLayout); | 1000 | Q_D(const UCSlotsLayout); |
213 | 996 | return d->mainSlot; | 1001 | return d->mainSlot; |
214 | 997 | } | 1002 | } |
215 | 998 | 1003 | ||
217 | 999 | void UCSlotsLayout::setMainSlot(QQuickItem *item) | 1004 | void UCSlotsLayout::setMainSlot(QQuickItem *item, bool fireSignal) |
218 | 1000 | { | 1005 | { |
219 | 1001 | Q_D(UCSlotsLayout); | 1006 | Q_D(UCSlotsLayout); |
220 | 1002 | if (d->mainSlot != item && item != Q_NULLPTR) { | 1007 | if (d->mainSlot != item && item != Q_NULLPTR) { |
221 | @@ -1008,7 +1013,10 @@ | |||
222 | 1008 | } | 1013 | } |
223 | 1009 | d->mainSlot = item; | 1014 | d->mainSlot = item; |
224 | 1010 | d->mainSlot->setParentItem(this); | 1015 | d->mainSlot->setParentItem(this); |
226 | 1011 | Q_EMIT mainSlotChanged(); | 1016 | |
227 | 1017 | if (fireSignal) { | ||
228 | 1018 | Q_EMIT mainSlotChanged(); | ||
229 | 1019 | } | ||
230 | 1012 | } | 1020 | } |
231 | 1013 | } | 1021 | } |
232 | 1014 | 1022 | ||
233 | 1015 | 1023 | ||
234 | === modified file 'src/Ubuntu/Components/plugin/ucslotslayout.h' | |||
235 | --- src/Ubuntu/Components/plugin/ucslotslayout.h 2015-09-30 15:53:49 +0000 | |||
236 | +++ src/Ubuntu/Components/plugin/ucslotslayout.h 2015-11-10 11:54:07 +0000 | |||
237 | @@ -36,8 +36,9 @@ | |||
238 | 36 | public: | 36 | public: |
239 | 37 | explicit UCSlotsLayout(QQuickItem *parent = 0); | 37 | explicit UCSlotsLayout(QQuickItem *parent = 0); |
240 | 38 | 38 | ||
243 | 39 | QQuickItem *mainSlot() const; | 39 | virtual QQuickItem *mainSlot(); |
244 | 40 | virtual void setMainSlot(QQuickItem *item); | 40 | virtual QQuickItem *mainSlot() const; |
245 | 41 | virtual void setMainSlot(QQuickItem *item, bool fireSignal = true); | ||
246 | 41 | 42 | ||
247 | 42 | UCSlotsLayoutPadding *padding(); | 43 | UCSlotsLayoutPadding *padding(); |
248 | 43 | 44 | ||
249 | 44 | 45 | ||
250 | === modified file 'src/Ubuntu/Test/UbuntuTestCase.qml' | |||
251 | --- src/Ubuntu/Test/UbuntuTestCase.qml 2015-09-17 06:29:36 +0000 | |||
252 | +++ src/Ubuntu/Test/UbuntuTestCase.qml 2015-11-10 11:54:07 +0000 | |||
253 | @@ -34,6 +34,11 @@ | |||
254 | 34 | } | 34 | } |
255 | 35 | 35 | ||
256 | 36 | /*! | 36 | /*! |
257 | 37 | This property holds the inner TestUtil instance. | ||
258 | 38 | */ | ||
259 | 39 | property alias testUtil: util | ||
260 | 40 | |||
261 | 41 | /*! | ||
262 | 37 | Find a child from the item based on the objectName. | 42 | Find a child from the item based on the objectName. |
263 | 38 | */ | 43 | */ |
264 | 39 | function findChild(obj,objectName) { | 44 | function findChild(obj,objectName) { |
265 | 40 | 45 | ||
266 | === modified file 'tests/unit_x11/tst_components/tst_slotslayout.qml' | |||
267 | --- tests/unit_x11/tst_components/tst_slotslayout.qml 2015-10-01 12:49:42 +0000 | |||
268 | +++ tests/unit_x11/tst_components/tst_slotslayout.qml 2015-11-10 11:54:07 +0000 | |||
269 | @@ -294,6 +294,10 @@ | |||
270 | 294 | name: "SlotsLayout" | 294 | name: "SlotsLayout" |
271 | 295 | when: windowShown | 295 | when: windowShown |
272 | 296 | 296 | ||
273 | 297 | function warningMsg(msg) { | ||
274 | 298 | return testUtil.callerFile() + ": " + msg | ||
275 | 299 | } | ||
276 | 300 | |||
277 | 297 | //Visual rule: | 301 | //Visual rule: |
278 | 298 | //when we have at least one slot which is taller than mainSlot and taller than 4GU, | 302 | //when we have at least one slot which is taller than mainSlot and taller than 4GU, |
279 | 299 | //we want the top and bottom padding to be 1GU instead of 2GU | 303 | //we want the top and bottom padding to be 1GU instead of 2GU |
280 | @@ -841,8 +845,33 @@ | |||
281 | 841 | 845 | ||
282 | 842 | Label {id: customMainSlot } | 846 | Label {id: customMainSlot } |
283 | 843 | function test_warningOnAttemptToChangeListItemLayoutMainSlot() { | 847 | function test_warningOnAttemptToChangeListItemLayoutMainSlot() { |
284 | 848 | ignoreWarning(warningFormat(60, 9, "QML ListItemLayout: Setting a different mainSlot on ListItemLayout is not supported. Please use SlotsLayout instead.")) | ||
285 | 844 | layoutLabels.mainSlot = customMainSlot | 849 | layoutLabels.mainSlot = customMainSlot |
287 | 845 | console.log(warningFormat(60, 9, "QML ListItemLayout: Setting a different mainSlot on ListItemLayout is not supported. Please use SlotsLayout instead.")) | 850 | } |
288 | 851 | |||
289 | 852 | |||
290 | 853 | Component { | ||
291 | 854 | id: layoutTestQmlContextComponent | ||
292 | 855 | ListItemLayout { | ||
293 | 856 | id: layoutTestQmlContext | ||
294 | 857 | title.text: "<html><body><p dir='ltr'>TEST <img align=absmiddle height=\"10\" width=\"10\" src=\"file:///test.png\" /> </p></body></html>" | ||
295 | 858 | title.textFormat: Text.RichText | ||
296 | 859 | subtitle.text: "<html><body><p dir='ltr'>TEST <img align=absmiddle height=\"10\" width=\"10\" src=\"file:///test.png\" /> </p></body></html>" | ||
297 | 860 | subtitle.textFormat: Text.RichText | ||
298 | 861 | summary.text: "<html><body><p dir='ltr'>TEST <img align=absmiddle height=\"10\" width=\"10\" src=\"file:///test.png\" /> </p></body></html>" | ||
299 | 862 | summary.textFormat: Text.RichText | ||
300 | 863 | } | ||
301 | 864 | } | ||
302 | 865 | //lp#1514173 | ||
303 | 866 | //this will make the test segfault if there is a regression | ||
304 | 867 | function test_defaultLabelsQmlContext() { | ||
305 | 868 | ignoreWarning(warningMsg("QML Label: Cannot open: file:///test.png")) | ||
306 | 869 | var obj = layoutTestQmlContextComponent.createObject(main) | ||
307 | 870 | //wait for rendering otherwise we will not get the "cannot find file" warning | ||
308 | 871 | //because the img is loaded async | ||
309 | 872 | waitForRendering(obj) | ||
310 | 873 | compare(obj !== null, true, "QML ListItemLayout: testing labels' QML context.") | ||
311 | 874 | obj.destroy() | ||
312 | 846 | } | 875 | } |
313 | 847 | } | 876 | } |
314 | 848 | } | 877 | } |
FAILED: Continuous integration, rev:1710 /code.launchpad .net/~faenil/ ubuntu- ui-toolkit/ listitemlayout_ lp1514173/ +merge/ 276942/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http:// jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/2456/ jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-amd64- ci/1184/ console jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-armhf- ci/1186/ console jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-i386- ci/1183/ console
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/2456/ rebuild
http://