Merge lp:~zsombi/ubuntu-ui-toolkit/fixAplHickupQt56 into lp:ubuntu-ui-toolkit/staging
- fixAplHickupQt56
- Merge into staging
Status: | Merged |
---|---|
Approved by: | Cris Dywan |
Approved revision: | 2122 |
Merged at revision: | 2127 |
Proposed branch: | lp:~zsombi/ubuntu-ui-toolkit/fixAplHickupQt56 |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Diff against target: |
168 lines (+43/-39) 2 files modified
src/imports/Components/1.3/AdaptivePageLayout.qml (+39/-35) tests/unit/visual/tst_adaptivepagelayout_configuration.13.qml (+4/-4) |
To merge this branch: | bzr merge lp:~zsombi/ubuntu-ui-toolkit/fixAplHickupQt56 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-sdk-build-bot | continuous-integration | Approve | |
Cris Dywan | Approve | ||
Review via email: mp+306255@code.launchpad.net |
Commit message
Fix AdaptivePageLayout behavior on Qt5.6
Description of the change
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2120
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:/
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2120
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:/
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2120
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:/
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2120
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:/
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2120
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:/
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 : | # |
Please back out the unrelated UbuntuListView changes.
- 2121. By Zsombor Egri
-
roll back UbuntuListView changes
- 2122. By Zsombor Egri
-
staging sync
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2122
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:2122
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:2122
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:2122
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:2122
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:2122
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:/
Zsombor Egri (zsombi) wrote : | # |
> Please back out the unrelated UbuntuListView changes.
Done
Cris Dywan (kalikiana) wrote : | # |
Thanks!!! Although the prevPrimaryPage
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2122
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:2122
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:2122
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:2122
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:2122
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'src/imports/Components/1.3/AdaptivePageLayout.qml' |
2 | --- src/imports/Components/1.3/AdaptivePageLayout.qml 2016-06-22 20:13:56 +0000 |
3 | +++ src/imports/Components/1.3/AdaptivePageLayout.qml 2016-09-22 17:42:40 +0000 |
4 | @@ -372,6 +372,18 @@ |
5 | d.relayout(); |
6 | } |
7 | if (primaryPageSource) { |
8 | + /* |
9 | + From Qt5.6 onwards, the change signal for a var type property (see |
10 | + bug https://bugreports.qt.io/browse/QTBUG-42255) comes after the |
11 | + component completion, due to elements being processed in parallel |
12 | + by the compiler. This causes the page to be created twice for the |
13 | + primaryPage, which ends up in failure for the second time that causes |
14 | + the primaryPage to be set to null. Thus no other page can be added |
15 | + afterwards. |
16 | + */ |
17 | + if (d.prevPrimaryPageSource === undefined) { |
18 | + d.prevPrimaryPageSource = primaryPageSource; |
19 | + } |
20 | d.createPrimaryPage(primaryPageSource); |
21 | } else if (primaryPage) { |
22 | d.createPrimaryPage(primaryPage); |
23 | @@ -392,11 +404,20 @@ |
24 | } |
25 | } |
26 | onPrimaryPageSourceChanged: { |
27 | - if (!d.completed || d.internalUpdate) { |
28 | - return; |
29 | - } |
30 | + if (!d.completed) { |
31 | + return; |
32 | + } |
33 | + if (d.internalUpdate) { |
34 | + d.prevPrimaryPageSource = primaryPageSource; |
35 | + return; |
36 | + } |
37 | + if (d.prevPrimaryPageSource === primaryPageSource) { |
38 | + return; |
39 | + } |
40 | + |
41 | // remove all pages first |
42 | d.purgeLayout(); |
43 | + d.prevPrimaryPageSource = primaryPageSource; |
44 | // create the new primary page if a valid component is specified |
45 | if (primaryPageSource) { |
46 | d.createPrimaryPage(primaryPageSource); |
47 | @@ -428,6 +449,7 @@ |
48 | property PageColumnsLayout activeLayout: null |
49 | property list<PageColumnsLayout> prevLayouts |
50 | property Page prevPrimaryPage |
51 | + property var prevPrimaryPageSource |
52 | |
53 | /*! internal */ |
54 | onColumnsChanged: { |
55 | @@ -438,7 +460,7 @@ |
56 | d.relayout(); |
57 | } |
58 | property real defaultColumnWidth: units.gu(40) |
59 | - onDefaultColumnWidthChanged: body.applyMetrics() |
60 | + onDefaultColumnWidthChanged: body.updateHeaderHeight(0) |
61 | |
62 | function internalPropertyUpdate(propertyName, value) { |
63 | internalUpdate = true; |
64 | @@ -685,15 +707,6 @@ |
65 | } |
66 | |
67 | |
68 | - // default metrics |
69 | - Component { |
70 | - id: defaultMetrics |
71 | - PageColumn { |
72 | - fillWidth: __column == d.columns |
73 | - minimumWidth: d.defaultColumnWidth |
74 | - } |
75 | - } |
76 | - |
77 | // An instance will be added to each Page with |
78 | Component { |
79 | id: backActionComponent |
80 | @@ -738,10 +751,20 @@ |
81 | id: holder |
82 | active: false |
83 | objectName: "ColumnHolder" + column |
84 | - property var pageWrapper: pageWrapperComponent.createObject() |
85 | + property PageWrapper pageWrapper: PageWrapper{} |
86 | + |
87 | property int column |
88 | property alias config: subHeader.config |
89 | - property PageColumn metrics: getDefaultMetrics() |
90 | + property PageColumn metrics: (d.activeLayout && d.activeLayout.data[column]) |
91 | + ? d.activeLayout.data[column] |
92 | + : defaultMetrics |
93 | + |
94 | + PageColumn { |
95 | + id: defaultMetrics |
96 | + fillWidth: (holder.column + 1) == d.columns |
97 | + minimumWidth: d.defaultColumnWidth |
98 | + } |
99 | + |
100 | readonly property real dividerThickness: units.dp(1) |
101 | readonly property alias hiddenPool: hiddenItem |
102 | |
103 | @@ -939,12 +962,6 @@ |
104 | wrapper.pageHolder = null; |
105 | return wrapper; |
106 | } |
107 | - |
108 | - function getDefaultMetrics() { |
109 | - var result = defaultMetrics.createObject(holder); |
110 | - result.__column = Qt.binding(function() { return holder.column + 1; }); |
111 | - return result; |
112 | - } |
113 | } |
114 | } |
115 | |
116 | @@ -1012,20 +1029,7 @@ |
117 | for (var i = 0; i < children.length; i++) { |
118 | children[i].column = i; |
119 | } |
120 | - applyMetrics(); |
121 | - } |
122 | - |
123 | - function applyMetrics() { |
124 | - for (var i = 0; i < children.length; i++) { |
125 | - var holder = children[i]; |
126 | - // search for the column metrics |
127 | - var metrics = d.activeLayout ? d.activeLayout.data[i] : null; |
128 | - if (!metrics) { |
129 | - metrics = holder.getDefaultMetrics(); |
130 | - } |
131 | - holder.metrics = metrics; |
132 | - updateHeaderHeight(0); |
133 | - } |
134 | + updateHeaderHeight(0); |
135 | } |
136 | } |
137 | } |
138 | |
139 | === modified file 'tests/unit/visual/tst_adaptivepagelayout_configuration.13.qml' |
140 | --- tests/unit/visual/tst_adaptivepagelayout_configuration.13.qml 2016-06-15 13:46:51 +0000 |
141 | +++ tests/unit/visual/tst_adaptivepagelayout_configuration.13.qml 2016-09-22 17:42:40 +0000 |
142 | @@ -112,7 +112,7 @@ |
143 | |
144 | Page { |
145 | id: page1 |
146 | - title: "Page1" |
147 | + header: PageHeader { title: "Page1" } |
148 | |
149 | Column { |
150 | anchors.centerIn: parent |
151 | @@ -129,15 +129,15 @@ |
152 | } |
153 | Page { |
154 | id: page2 |
155 | - title: "Page2" |
156 | + header: PageHeader { title: "Page2" } |
157 | } |
158 | Page { |
159 | id: page3 |
160 | - title: "Page3" |
161 | + header: PageHeader { title: "Page3" } |
162 | } |
163 | Page { |
164 | id: page4 |
165 | - title: "Page4" |
166 | + header: PageHeader { title: "Page4" } |
167 | } |
168 | } |
169 |
FAILED: Continuous integration, rev:2120 /code.launchpad .net/~zsombi/ ubuntu- ui-toolkit/ fixAplHickupQt5 6/+merge/ 306255/ +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:/
https:/ /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-i386- gles-stable/ 1226/ /jenkins. ubuntu. com/ubuntu- sdk/job/ generic- update- mp/6675/ console
Executed test runs:
None: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-i386- gles-stable/ 1226/rebuild
https:/