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

Proposed by Andrea Bernabei
Status: Merged
Approved by: Zsombor Egri
Approved revision: 2105
Merged at revision: 2106
Proposed branch: lp:~faenil/ubuntu-ui-toolkit/fix_ubuntulistview_units_test_qt56
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 41 lines (+5/-5)
1 file modified
tests/unit/visual/tst_ubuntulistview.10.qml (+5/-5)
To merge this branch: bzr merge lp:~faenil/ubuntu-ui-toolkit/fix_ubuntulistview_units_test_qt56
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zsombor Egri Approve
Cris Dywan Pending
Review via email: mp+306025@code.launchpad.net

Commit message

Qt5.6: fix ubuntulistview.10 unit test

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 ubuntulistview.10 unit test

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: 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)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Well, previously those two undefined params were considered as (0, 0). Thanks for the fix!

review: Approve
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=== renamed file 'tests/unit/visual/FIXME-QT56_ubuntulistview.10.qml' => 'tests/unit/visual/tst_ubuntulistview.10.qml'
2--- tests/unit/visual/FIXME-QT56_ubuntulistview.10.qml 2016-09-16 11:20:57 +0000
3+++ tests/unit/visual/tst_ubuntulistview.10.qml 2016-09-17 12:08:10 +0000
4@@ -114,12 +114,12 @@
5
6 function test_noScrollingNeeded() {
7 var item = findChild(ubuntuListView, "expandable1");
8- fuzzyCompare(ubuntuListView.mapFromItem(item).y, item.collapsedHeight, .5);
9+ fuzzyCompare(ubuntuListView.mapFromItem(item, 0, 0).y, item.collapsedHeight, .5);
10
11 expandItem(item);
12 waitForRendering(ubuntuListView);
13
14- fuzzyCompare(ubuntuListView.mapFromItem(item).y, item.collapsedHeight, .5);
15+ fuzzyCompare(ubuntuListView.mapFromItem(item, 0, 0).y, item.collapsedHeight, .5);
16 }
17
18 function test_scrollToTop() {
19@@ -127,11 +127,11 @@
20 ubuntuListView.positionViewAtIndex(0, ListView.Beginning)
21
22 var item = findChild(ubuntuListView, "expandable1");
23- fuzzyCompare(ubuntuListView.mapFromItem(item).y, item.collapsedHeight, 1);
24+ fuzzyCompare(ubuntuListView.mapFromItem(item, 0, 0).y, item.collapsedHeight, 1);
25
26 expandItem(item);
27
28- fuzzyCompare(ubuntuListView.mapFromItem(item).y, 0, .5);
29+ fuzzyCompare(ubuntuListView.mapFromItem(item, 0, 0).y, 0, .5);
30 }
31
32 function test_scrollIntoView() {
33@@ -140,7 +140,7 @@
34 waitForRendering(ubuntuListView);
35
36 // The item must be scrolled upwards, leaving space for one other item at the bottom
37- fuzzyCompare(ubuntuListView.mapFromItem(item).y, ubuntuListView.height - item.collapsedHeight - item.expandedHeight, 1);
38+ fuzzyCompare(ubuntuListView.mapFromItem(item, 0, 0).y, ubuntuListView.height - item.collapsedHeight - item.expandedHeight, 1);
39 }
40
41 function test_collapseByClickingOutside() {

Subscribers

People subscribed via source and target branches