Merge lp:~faenil/ubuntu-ui-toolkit/slotslayout_implicitwidthloop_bug1630167 into lp:ubuntu-ui-toolkit/staging
- slotslayout_implicitwidthloop_bug1630167
- Merge into staging
Status: | Merged |
---|---|
Approved by: | Timo Jyrinki |
Approved revision: | 2108 |
Merged at revision: | 2139 |
Proposed branch: | lp:~faenil/ubuntu-ui-toolkit/slotslayout_implicitwidthloop_bug1630167 |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Diff against target: |
60 lines (+32/-1) 2 files modified
src/UbuntuToolkit/ucslotslayout.cpp (+4/-1) tests/unit/visual/tst_slotslayout.13.qml (+28/-0) |
To merge this branch: | bzr merge lp:~faenil/ubuntu-ui-toolkit/slotslayout_implicitwidthloop_bug1630167 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) (community) | Approve | ||
ubuntu-sdk-build-bot | continuous-integration | Approve | |
Cris Dywan | Approve | ||
Zsombor Egri | Pending | ||
Review via email: mp+307956@code.launchpad.net |
Commit message
SlotsLayout: do not set mainSlot's implicitSize, set its real size instead
Description of the change
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2107
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2107
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2107
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2107
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2107
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Cris Dywan (kalikiana) wrote : | # |
> console.log("Bug #1630167 if no ouput after this line")
For the record, I was going to ask "Who is going to read that?" but realized that the test will be generating a warning
WARNING **: Timing out at maximum wait of 500 seconds
which does fail the test (verified locally).
So, looking good!
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Timo Jyrinki (timo-jyrinki) wrote : | # |
Ok yakkety hopefully fixed now, retopapproving.
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2108
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Confirmed working fine (and fixing the infinte loop) also in my test case.
Thanks
Preview Diff
1 | === modified file 'src/UbuntuToolkit/ucslotslayout.cpp' | |||
2 | --- src/UbuntuToolkit/ucslotslayout.cpp 2016-09-27 16:55:03 +0000 | |||
3 | +++ src/UbuntuToolkit/ucslotslayout.cpp 2016-10-07 14:35:32 +0000 | |||
4 | @@ -540,7 +540,10 @@ | |||
5 | 540 | qmlInfo(q) << "Invalid attached property!"; | 540 | qmlInfo(q) << "Invalid attached property!"; |
6 | 541 | return; | 541 | return; |
7 | 542 | } | 542 | } |
9 | 543 | mainSlot->setImplicitWidth(q->width() - totalSlotsWidth | 543 | //bug#1630167: set width instead of implicitWidth to avoid clashing with internal logic of the |
10 | 544 | //component which is inside the mainSlot (e.g. Column and positioners handle the implicit width | ||
11 | 545 | //themselves) | ||
12 | 546 | mainSlot->setWidth(q->width() - totalSlotsWidth | ||
13 | 544 | - attachedProps->padding()->leading() | 547 | - attachedProps->padding()->leading() |
14 | 545 | - attachedProps->padding()->trailing() | 548 | - attachedProps->padding()->trailing() |
15 | 546 | - padding.leading() - padding.trailing()); | 549 | - padding.leading() - padding.trailing()); |
16 | 547 | 550 | ||
17 | === modified file 'tests/unit/visual/tst_slotslayout.13.qml' | |||
18 | --- tests/unit/visual/tst_slotslayout.13.qml 2016-09-27 21:49:47 +0000 | |||
19 | +++ tests/unit/visual/tst_slotslayout.13.qml 2016-10-07 14:35:32 +0000 | |||
20 | @@ -317,6 +317,26 @@ | |||
21 | 317 | } | 317 | } |
22 | 318 | } | 318 | } |
23 | 319 | 319 | ||
24 | 320 | Component { | ||
25 | 321 | id: mainSlotImplicitWidthComponent | ||
26 | 322 | SlotsLayout { | ||
27 | 323 | id: mainSlotImplicitSizeTest | ||
28 | 324 | //by forcing 2gu width and 2gu+2gu padding we force the mainSlot to have a negative size | ||
29 | 325 | //which is the condition that triggers bug #1630167 | ||
30 | 326 | width: units.gu(2) | ||
31 | 327 | padding { | ||
32 | 328 | leading: units.gu(2) | ||
33 | 329 | trailing: units.gu(2) | ||
34 | 330 | } | ||
35 | 331 | mainSlot: Column { | ||
36 | 332 | Item { | ||
37 | 333 | width: parent.width | ||
38 | 334 | height: 5 | ||
39 | 335 | } | ||
40 | 336 | } | ||
41 | 337 | } | ||
42 | 338 | } | ||
43 | 339 | |||
44 | 320 | UbuntuTestCase { | 340 | UbuntuTestCase { |
45 | 321 | name: "SlotsLayout" | 341 | name: "SlotsLayout" |
46 | 322 | when: windowShown | 342 | when: windowShown |
47 | @@ -985,5 +1005,13 @@ | |||
48 | 985 | "Multiline labels positioning: wrong summary lineCount") | 1005 | "Multiline labels positioning: wrong summary lineCount") |
49 | 986 | checkLabelsY(layoutMultilineLabels) | 1006 | checkLabelsY(layoutMultilineLabels) |
50 | 987 | } | 1007 | } |
51 | 1008 | |||
52 | 1009 | //Bug #1630167: this test will trigger an endless loop in case of regression | ||
53 | 1010 | function test_implicitMainSlotWidthLoop() { | ||
54 | 1011 | console.log("Bug #1630167 if no ouput after this line") | ||
55 | 1012 | var obj = mainSlotImplicitWidthComponent.createObject(main); | ||
56 | 1013 | waitForRendering(obj); | ||
57 | 1014 | verify(obj !== null, "test_implicitMainSlotWidthLoop, dynamic object creation."); | ||
58 | 1015 | } | ||
59 | 988 | } | 1016 | } |
60 | 989 | } | 1017 | } |
PASSED: Continuous integration, rev:2107 /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-i386- gles-stable/ 1283/ /jenkins. ubuntu. com/ubuntu- sdk/job/ generic- update- mp/7003/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-i386- gles-stable/ 1283/rebuild
https:/