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 | qmlInfo(q) << "Invalid attached property!"; |
6 | return; |
7 | } |
8 | - mainSlot->setImplicitWidth(q->width() - totalSlotsWidth |
9 | + //bug#1630167: set width instead of implicitWidth to avoid clashing with internal logic of the |
10 | + //component which is inside the mainSlot (e.g. Column and positioners handle the implicit width |
11 | + //themselves) |
12 | + mainSlot->setWidth(q->width() - totalSlotsWidth |
13 | - attachedProps->padding()->leading() |
14 | - attachedProps->padding()->trailing() |
15 | - padding.leading() - padding.trailing()); |
16 | |
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 | } |
22 | } |
23 | |
24 | + Component { |
25 | + id: mainSlotImplicitWidthComponent |
26 | + SlotsLayout { |
27 | + id: mainSlotImplicitSizeTest |
28 | + //by forcing 2gu width and 2gu+2gu padding we force the mainSlot to have a negative size |
29 | + //which is the condition that triggers bug #1630167 |
30 | + width: units.gu(2) |
31 | + padding { |
32 | + leading: units.gu(2) |
33 | + trailing: units.gu(2) |
34 | + } |
35 | + mainSlot: Column { |
36 | + Item { |
37 | + width: parent.width |
38 | + height: 5 |
39 | + } |
40 | + } |
41 | + } |
42 | + } |
43 | + |
44 | UbuntuTestCase { |
45 | name: "SlotsLayout" |
46 | when: windowShown |
47 | @@ -985,5 +1005,13 @@ |
48 | "Multiline labels positioning: wrong summary lineCount") |
49 | checkLabelsY(layoutMultilineLabels) |
50 | } |
51 | + |
52 | + //Bug #1630167: this test will trigger an endless loop in case of regression |
53 | + function test_implicitMainSlotWidthLoop() { |
54 | + console.log("Bug #1630167 if no ouput after this line") |
55 | + var obj = mainSlotImplicitWidthComponent.createObject(main); |
56 | + waitForRendering(obj); |
57 | + verify(obj !== null, "test_implicitMainSlotWidthLoop, dynamic object creation."); |
58 | + } |
59 | } |
60 | } |
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:/