Merge lp:~faenil/ubuntu-ui-toolkit/fix_expandables_units_tests_qt56 into lp:ubuntu-ui-toolkit/staging

Proposed by Andrea Bernabei
Status: Merged
Approved by: Zsombor Egri
Approved revision: 2105
Merged at revision: 2114
Proposed branch: lp:~faenil/ubuntu-ui-toolkit/fix_expandables_units_tests_qt56
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 70 lines (+8/-8)
2 files modified
src/imports/Components/ListItems/1.2/ExpandablesColumn.qml (+3/-3)
tests/unit/visual/tst_expandablescolumn.11.qml (+5/-5)
To merge this branch: bzr merge lp:~faenil/ubuntu-ui-toolkit/fix_expandables_units_tests_qt56
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zsombor Egri Approve
Cris Dywan Pending
Review via email: mp+306024@code.launchpad.net

Commit message

Qt5.6: Fix expandablescolumn.11 and expandables.11 unit tests

We were previously misusing mapToItem/mapFromItem by not passing x/y parameters and relying on the code in qquickitem.cpp to initialize them to 0.

Qt5.6 fixes QTBUG-41686 and requires x/y to be explicitly passed.

Description of the change

Qt5.6: Fix expandablescolumn.11 and expandables.11 unit tests

We were previously misusing mapToItem/mapFromItem by not passing x/y parameters and relying on the code in qquickitem.cpp to initialize them to 0.

Qt5.6 fixes QTBUG-41686 and requires x/y to be explicitly passed.

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Yep, all changes are sensible.

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Re-topapproving because of armhf failure, although do note we now have yakkety CI too.

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Yakkety tests now fixed ("fixed") with another MP, retopapproving.

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Components/ListItems/1.2/ExpandablesColumn.qml'
2--- src/imports/Components/ListItems/1.2/ExpandablesColumn.qml 2015-04-30 08:32:44 +0000
3+++ src/imports/Components/ListItems/1.2/ExpandablesColumn.qml 2016-09-17 11:55:03 +0000
4@@ -75,7 +75,7 @@
5
6 var maxExpandedHeight = root.height - item.collapsedHeight;
7 var expandedItemHeight = Math.min(item.expandedHeight, maxExpandedHeight);
8- var bottomIntersect = root.mapFromItem(item).y + expandedItemHeight - maxExpandedHeight;
9+ var bottomIntersect = root.mapFromItem(item, 0, 0).y + expandedItemHeight - maxExpandedHeight;
10 if (bottomIntersect > 0) {
11 contentY += bottomIntersect;
12 }
13@@ -117,14 +117,14 @@
14
15 MouseArea {
16 anchors { left: parent.left; right: parent.right; top: parent.top }
17- height: root.mapFromItem(priv.expandedItem).y + root.contentY
18+ height: root.mapFromItem(priv.expandedItem, 0, 0).y + root.contentY
19 enabled: priv.expandedItem != null
20 onClicked: root.collapse();
21 }
22
23 MouseArea {
24 anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
25- height: priv.expandedItem != null ? root.contentHeight - (root.mapFromItem(priv.expandedItem).y + root.contentY + priv.expandedItem.height) : 0
26+ height: priv.expandedItem != null ? root.contentHeight - (root.mapFromItem(priv.expandedItem, 0, 0).y + root.contentY + priv.expandedItem.height) : 0
27 enabled: priv.expandedItem != null
28 onClicked: root.collapse();
29 }
30
31=== renamed file 'tests/unit/visual/FIXME-QT56_expandable.11.qml' => 'tests/unit/visual/tst_expandables.11.qml'
32=== renamed file 'tests/unit/visual/FIXME-QT56_expandablescolumn.11.qml' => 'tests/unit/visual/tst_expandablescolumn.11.qml'
33--- tests/unit/visual/FIXME-QT56_expandablescolumn.11.qml 2016-09-16 10:32:23 +0000
34+++ tests/unit/visual/tst_expandablescolumn.11.qml 2016-09-17 11:55:03 +0000
35@@ -101,22 +101,22 @@
36
37 function test_noScrollingNeeded() {
38 var item = findChild(expandablesColumn, "expandable1");
39- compare(expandablesColumn.mapFromItem(item).y, item.collapsedHeight);
40+ compare(expandablesColumn.mapFromItem(item, 0, 0).y, item.collapsedHeight);
41
42 expandItem(item);
43
44- compare(expandablesColumn.mapFromItem(item).y, item.collapsedHeight);
45+ compare(expandablesColumn.mapFromItem(item, 0, 0).y, item.collapsedHeight);
46 }
47
48 function test_scrollToTop() {
49 expandablesColumn.height = units.gu(30);
50
51 var item = findChild(expandablesColumn, "expandable1");
52- compare(expandablesColumn.mapFromItem(item).y, item.collapsedHeight);
53+ compare(expandablesColumn.mapFromItem(item, 0, 0).y, item.collapsedHeight);
54
55 expandItem(item);
56
57- compare(expandablesColumn.mapFromItem(item).y, 0);
58+ compare(expandablesColumn.mapFromItem(item, 0, 0).y, 0);
59 }
60
61 function test_scrollIntoView() {
62@@ -124,7 +124,7 @@
63 expandItem(item);
64
65 // The item must be scrolled upwards, leaving space for one other item at the bottom
66- compare(expandablesColumn.mapFromItem(item).y, expandablesColumn.height - item.collapsedHeight - item.expandedHeight);
67+ compare(expandablesColumn.mapFromItem(item, 0, 0).y, expandablesColumn.height - item.collapsedHeight - item.expandedHeight);
68 }
69
70 function test_collapseByClickingOutside() {

Subscribers

People subscribed via source and target branches