~loic.molinari/ubuntu-ui-toolkit/uitk-linux-clang

« back to all changes in this revision

Viewing changes to tests/unit/visual/tst_scrollbar.13.qml

  • Committer: Tarmac
  • Author(s): Andrea Bernabei
  • Date: 2016-09-19 11:07:47 UTC
  • mfrom: (2104.2.2 staging)
  • Revision ID: tarmac-20160919110747-57nxyjuoez4d51g9
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. Fixes: https://bugs.launchpad.net/bugs/1624337.

Approved by ubuntu-sdk-build-bot, Zsombor Egri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
798
798
                        flickable.contentHeight + flickable.bottomMargin - flickable.height,
799
799
                        "Vertical thumb mouse drag: wrong contentProp after dragging to the end")
800
800
 
801
 
                var sceneThumbY = thumb.mapToItem(column).y
 
801
                var sceneThumbY = thumb.mapToItem(column, 0, 0).y
802
802
 
803
803
                //Cannot use mouseDrag here, because the thumb is at the end of the trough.
804
804
                //mouseDrag uses
836
836
                        flickable.contentWidth + flickable.rightMargin - flickable.width,
837
837
                        "Horizontal thumb mouse drag: wrong contentProp after dragging to the end")
838
838
 
839
 
                var sceneThumbX = thumb.mapToItem(column).x
 
839
                var sceneThumbX = thumb.mapToItem(column, 0, 0).x
840
840
                //Can't use mouseDrag here, see the explanation inside the "if" branch
841
841
                mousePress(thumb, thumb.width/2, thumb.height/2)
842
842
                mouseMove(thumb, 0, thumb.height/2  )
1203
1203
            compare(style.troughColorThumbStyle, theme.palette.normal.foreground, "Wrong styling property default value.")
1204
1204
            compare(style.troughColorSteppersStyle, theme.palette.normal.foreground, "Wrong styling property default value.")
1205
1205
            compare(style.stepperBgColor, theme.palette.normal.base, "Wrong styling property default value.")
1206
 
            compare(style.sliderColor, theme.palette.normal.foregroundText, "Wrong styling property default value.")
 
1206
            compare(style.sliderColor, theme.palette.normal.overlayText, "Wrong styling property default value.")
1207
1207
            compare(style.sliderRadius, units.dp(3), "Wrong styling property default value.")
1208
1208
            compare(style.thumbThickness, units.gu(1), "Wrong styling property default value.")
1209
1209
            compare(style.indicatorThickness, units.dp(3), "Wrong styling property default value.")