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

Proposed by Andrea Bernabei
Status: Merged
Approved by: Andrea Bernabei
Approved revision: 2106
Merged at revision: 2107
Proposed branch: lp:~faenil/ubuntu-ui-toolkit/fix_scrollbar_tests_qt56
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 43 lines (+4/-4)
2 files modified
tests/unit/visual/tst_scrollbar.13.qml (+3/-3)
tests/unit/visual/tst_scrollbar_header.13.qml (+1/-1)
To merge this branch: bzr merge lp:~faenil/ubuntu-ui-toolkit/fix_scrollbar_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+306022@code.launchpad.net

Commit message

Qt5.6: fix Scrollbar 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 by requiring all parameters to be passed.

Description of the change

Fix scrollbar unit tests in Qt5.6

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 by requiring all parameters to be 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 :

One check inline.

review: Needs Information
Revision history for this message
Andrea Bernabei (faenil) wrote :

replied

Revision history for this message
Zsombor Egri (zsombi) wrote :

Ok, got convinced, thanks for fixing!

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
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: 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)

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_scrollbar.13.qml' => 'tests/unit/visual/tst_scrollbar.13.qml'
2--- tests/unit/visual/FIXME-QT56_scrollbar.13.qml 2016-09-16 11:13:32 +0000
3+++ tests/unit/visual/tst_scrollbar.13.qml 2016-09-17 11:29:49 +0000
4@@ -798,7 +798,7 @@
5 flickable.contentHeight + flickable.bottomMargin - flickable.height,
6 "Vertical thumb mouse drag: wrong contentProp after dragging to the end")
7
8- var sceneThumbY = thumb.mapToItem(column).y
9+ var sceneThumbY = thumb.mapToItem(column, 0, 0).y
10
11 //Cannot use mouseDrag here, because the thumb is at the end of the trough.
12 //mouseDrag uses
13@@ -836,7 +836,7 @@
14 flickable.contentWidth + flickable.rightMargin - flickable.width,
15 "Horizontal thumb mouse drag: wrong contentProp after dragging to the end")
16
17- var sceneThumbX = thumb.mapToItem(column).x
18+ var sceneThumbX = thumb.mapToItem(column, 0, 0).x
19 //Can't use mouseDrag here, see the explanation inside the "if" branch
20 mousePress(thumb, thumb.width/2, thumb.height/2)
21 mouseMove(thumb, 0, thumb.height/2 )
22@@ -1203,7 +1203,7 @@
23 compare(style.troughColorThumbStyle, theme.palette.normal.foreground, "Wrong styling property default value.")
24 compare(style.troughColorSteppersStyle, theme.palette.normal.foreground, "Wrong styling property default value.")
25 compare(style.stepperBgColor, theme.palette.normal.base, "Wrong styling property default value.")
26- compare(style.sliderColor, theme.palette.normal.foregroundText, "Wrong styling property default value.")
27+ compare(style.sliderColor, theme.palette.normal.overlayText, "Wrong styling property default value.")
28 compare(style.sliderRadius, units.dp(3), "Wrong styling property default value.")
29 compare(style.thumbThickness, units.gu(1), "Wrong styling property default value.")
30 compare(style.indicatorThickness, units.dp(3), "Wrong styling property default value.")
31
32=== renamed file 'tests/unit/visual/FIXME-QT56_scrollbar_header.13.qml' => 'tests/unit/visual/tst_scrollbar_header.13.qml'
33--- tests/unit/visual/FIXME-QT56_scrollbar_header.13.qml 2016-09-16 11:13:32 +0000
34+++ tests/unit/visual/tst_scrollbar_header.13.qml 2016-09-17 11:29:49 +0000
35@@ -228,7 +228,7 @@
36 }
37
38 function checkScrollbarPositionRelativeToPage(scrollbar, page, expectedY, msgPrefix) {
39- compare(scrollbar.mapToItem(page).y, expectedY, msgPrefix + ": Scrollbar does not start below the header.")
40+ compare(scrollbar.mapToItem(page, 0, 0).y, expectedY, msgPrefix + ": Scrollbar does not start below the header.")
41 }
42
43 function test_handlingOfMovingHeader_data() {

Subscribers

People subscribed via source and target branches