diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2011-10-14 10:51:42 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-21 11:53:26 +0200 |
commit | bfb3c424abc7c839dc44de0e36024ede99ece736 (patch) | |
tree | b6814d0238bead8518b23c078beb818432de6ce4 /tests | |
parent | 2d119a137f1bc0c8b1113cd6c58413a1b89a4c1c (diff) |
Rename Qt Quick-specific classes to QQuick*
The QSG (SceneGraph) prefix is too generic for
Qt Quick(2)-specific classes.
All the classes and files in the declarative/items
directory have been renamed.
In particular, for classes that are currently public,
the renaming is as follows:
QSGView --> QQuickView
QSGCanvas --> QQuickCanvas
QSGItem --> QQuickItem
QSGPaintedItem --> QQuickPaintedItem
The header files have been renamed accordingly
(e.g. qsgview.h --> qquickview.h).
Change-Id: Iac937fff81db20bb639486a793c3aeb5230b038c
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp | 10 | ||||
-rw-r--r-- | tests/auto/declarative/declarative.pro | 54 | ||||
-rw-r--r-- | tests/auto/declarative/examples/tst_examples.cpp | 10 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp | 194 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp | 18 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp | 122 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp | 16 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp | 14 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp | 34 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp | 44 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp | 30 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp | 12 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp | 376 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qmlmin/tst_qmlmin.cpp | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/colors.gif (renamed from tests/auto/declarative/qsganimatedimage/data/colors.gif) | bin | 505 -> 505 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/colors.qml (renamed from tests/auto/declarative/qsganimatedimage/data/colors.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/hearts.gif (renamed from tests/auto/declarative/qsganimatedimage/data/hearts.gif) | bin | 6524 -> 6524 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/hearts.qml (renamed from tests/auto/declarative/qsganimatedimage/data/hearts.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/qmldir (renamed from tests/auto/declarative/qsganimatedimage/data/qmldir) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/qtbug-16520.qml (renamed from tests/auto/declarative/qsganimatedimage/data/qtbug-16520.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickman.gif (renamed from tests/auto/declarative/qsganimatedimage/data/stickman.gif) | bin | 164923 -> 164923 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickman.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickman.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickmanerror1.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickmanerror1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickmanpause.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickmanpause.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickmanscaled.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickmanscaled.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickmanstopped.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickmanstopped.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/qquickanimatedimage.pro (renamed from tests/auto/declarative/qsganimatedimage/qsganimatedimage.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/tst_qquickanimatedimage.cpp (renamed from tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp) | 90 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors-mirror.png (renamed from tests/auto/declarative/qsgborderimage/data/colors-mirror.png) | bin | 5554 -> 5554 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors-round-quotes.sci (renamed from tests/auto/declarative/qsgborderimage/data/colors-round-quotes.sci) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors-round-remote.sci (renamed from tests/auto/declarative/qsgborderimage/data/colors-round-remote.sci) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors-round.sci (renamed from tests/auto/declarative/qsgborderimage/data/colors-round.sci) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors.png (renamed from tests/auto/declarative/qsgborderimage/data/colors.png) | bin | 1655 -> 1655 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/heart200.png (renamed from tests/auto/declarative/qsgborderimage/data/heart200.png) | bin | 7943 -> 7943 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/invalid.sci (renamed from tests/auto/declarative/qsgborderimage/data/invalid.sci) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/mirror.qml (renamed from tests/auto/declarative/qsgborderimage/data/mirror.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/qquickborderimage.pro (renamed from tests/auto/declarative/qsgborderimage/qsgborderimage.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/tst_qquickborderimage.cpp (renamed from tests/auto/declarative/qsgborderimage/tst_qsgborderimage.cpp) | 126 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvas/qquickcanvas.pro (renamed from tests/auto/declarative/qsgcanvas/qsgcanvas.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvas/tst_qquickcanvas.cpp (renamed from tests/auto/declarative/qsgcanvas/tst_qsgcanvas.cpp) | 58 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/anim-gr.gif (renamed from tests/auto/declarative/qsgcanvasitem/data/anim-gr.gif) | bin | 241 -> 241 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/anim-gr.png (renamed from tests/auto/declarative/qsgcanvasitem/data/anim-gr.png) | bin | 460 -> 460 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/anim-poster-gr.png (renamed from tests/auto/declarative/qsgcanvasitem/data/anim-poster-gr.png) | bin | 422 -> 422 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/background.png (renamed from tests/auto/declarative/qsgcanvasitem/data/background.png) | bin | 86 -> 86 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/broken.png (renamed from tests/auto/declarative/qsgcanvasitem/data/broken.png) | bin | 87 -> 87 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/ggrr-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/ggrr-256x256.png) | bin | 120 -> 120 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green-16x16.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green-16x16.png) | bin | 92 -> 92 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green-1x1.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green-1x1.png) | bin | 82 -> 82 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green-256x256.png) | bin | 103 -> 103 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green-2x2.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green-2x2.png) | bin | 118 -> 118 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green.png) | bin | 87 -> 87 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/grgr-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/grgr-256x256.png) | bin | 130 -> 130 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/red-16x16.png (renamed from tests/auto/declarative/qsgcanvasitem/data/red-16x16.png) | bin | 130 -> 130 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/red.png (renamed from tests/auto/declarative/qsgcanvasitem/data/red.png) | bin | 87 -> 87 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/redtransparent.png (renamed from tests/auto/declarative/qsgcanvasitem/data/redtransparent.png) | bin | 109 -> 109 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/rgrg-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/rgrg-256x256.png) | bin | 131 -> 131 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/rrgg-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/rrgg-256x256.png) | bin | 120 -> 120 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/testhelper.js (renamed from tests/auto/declarative/qsgcanvasitem/data/testhelper.js) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/transparent.png (renamed from tests/auto/declarative/qsgcanvasitem/data/transparent.png) | bin | 100 -> 100 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/transparent50.png (renamed from tests/auto/declarative/qsgcanvasitem/data/transparent50.png) | bin | 155 -> 155 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_arc.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_arc.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_arcto.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_arcto.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_canvas.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_canvas.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_composite.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_composite.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_drawimage.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_drawimage.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_fillStyle.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_fillStyle.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_fillrect.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_fillrect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_gradient.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_gradient.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_line.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_line.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_path.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_path.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_pattern.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_pattern.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_pixel.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_pixel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_shadow.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_shadow.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_state.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_state.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_strokeStyle.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_strokeStyle.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_text.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_text.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_transform.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_transform.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/yellow.png (renamed from tests/auto/declarative/qsgcanvasitem/data/yellow.png) | bin | 95 -> 95 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/yellow75.png (renamed from tests/auto/declarative/qsgcanvasitem/data/yellow75.png) | bin | 150 -> 150 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/qquickcanvasitem.pro (renamed from tests/auto/declarative/qsgcanvasitem/qsgcanvasitem.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/tst_qquickcanvasitem.cpp (renamed from tests/auto/declarative/qsgcanvasitem/tst_qsgcanvasitem.cpp) | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qquickdrag/qquickdrag.pro (renamed from tests/auto/declarative/qsgdrag/qsgdrag.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickdrag/tst_qquickdrag.cpp (renamed from tests/auto/declarative/qsgdrag/tst_qsgdrag.cpp) | 86 | ||||
-rw-r--r-- | tests/auto/declarative/qquickdroparea/qquickdroparea.pro (renamed from tests/auto/declarative/qsgdroparea/qsgdroparea.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickdroparea/tst_qquickdroparea.cpp (renamed from tests/auto/declarative/qsgdroparea/tst_qsgdroparea.cpp) | 103 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/disabled.qml (renamed from tests/auto/declarative/qsgflickable/data/disabled.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickable01.qml (renamed from tests/auto/declarative/qsgflickable/data/flickable01.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickable02.qml (renamed from tests/auto/declarative/qsgflickable/data/flickable02.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickable03.qml (renamed from tests/auto/declarative/qsgflickable/data/flickable03.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickable04.qml (renamed from tests/auto/declarative/qsgflickable/data/flickable04.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickableqgraphicswidget.qml (renamed from tests/auto/declarative/qsgflickable/data/flickableqgraphicswidget.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/margins.qml (renamed from tests/auto/declarative/qsgflickable/data/margins.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/nestedPressDelay.qml (renamed from tests/auto/declarative/qsgflickable/data/nestedPressDelay.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/resize.qml (renamed from tests/auto/declarative/qsgflickable/data/resize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/wheel.qml (renamed from tests/auto/declarative/qsgflickable/data/wheel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/qquickflickable.pro (renamed from tests/auto/declarative/qsgflickable/qsgflickable.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp (renamed from tests/auto/declarative/qsgflickable/tst_qsgflickable.cpp) | 156 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/data/crash.qml (renamed from tests/auto/declarative/qsgflipable/data/crash.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/data/flipable-abort.qml (renamed from tests/auto/declarative/qsgflipable/data/flipable-abort.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/data/test-flipable.qml (renamed from tests/auto/declarative/qsgflipable/data/test-flipable.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/qquickflipable.pro (renamed from tests/auto/declarative/qsgflipable/qsgflipable.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/tst_qquickflipable.cpp (renamed from tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp) | 48 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/canvasFocus.qml (renamed from tests/auto/declarative/qsgfocusscope/data/canvasFocus.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/chain.qml (renamed from tests/auto/declarative/qsgfocusscope/data/chain.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/forceActiveFocus.qml (renamed from tests/auto/declarative/qsgfocusscope/data/forceActiveFocus.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/forcefocus.qml (renamed from tests/auto/declarative/qsgfocusscope/data/forcefocus.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/qtBug13380.qml (renamed from tests/auto/declarative/qsgfocusscope/data/qtBug13380.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/signalEmission.qml (renamed from tests/auto/declarative/qsgfocusscope/data/signalEmission.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test2.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test3.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test4.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test5.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test5.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/qquickfocusscope.pro (renamed from tests/auto/declarative/qsgfocusscope/qsgfocusscope.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/tst_qquickfocusscope.cpp (renamed from tests/auto/declarative/qsgfocusscope/tst_qsgfocusscope.cpp) | 152 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/ComponentView.qml (renamed from tests/auto/declarative/qsggridview/data/ComponentView.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/attachedSignals.qml (renamed from tests/auto/declarative/qsggridview/data/attachedSignals.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/creationContext.qml (renamed from tests/auto/declarative/qsggridview/data/creationContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/displaygrid.qml (renamed from tests/auto/declarative/qsggridview/data/displaygrid.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/footer.qml (renamed from tests/auto/declarative/qsggridview/data/footer.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview-enforcerange.qml (renamed from tests/auto/declarative/qsggridview/data/gridview-enforcerange.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml (renamed from tests/auto/declarative/qsggridview/data/gridview-initCurrent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview-noCurrent.qml (renamed from tests/auto/declarative/qsggridview/data/gridview-noCurrent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview1.qml (renamed from tests/auto/declarative/qsggridview/data/gridview1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview2.qml (renamed from tests/auto/declarative/qsggridview/data/gridview2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview3.qml (renamed from tests/auto/declarative/qsggridview/data/gridview3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview4.qml (renamed from tests/auto/declarative/qsggridview/data/gridview4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/header.qml (renamed from tests/auto/declarative/qsggridview/data/header.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/manual-highlight.qml (renamed from tests/auto/declarative/qsggridview/data/manual-highlight.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/margins.qml (renamed from tests/auto/declarative/qsggridview/data/margins.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/mirroring.qml (renamed from tests/auto/declarative/qsggridview/data/mirroring.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/propertychangestest.qml (renamed from tests/auto/declarative/qsggridview/data/propertychangestest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/resizeview.qml (renamed from tests/auto/declarative/qsggridview/data/resizeview.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/setindex.qml (renamed from tests/auto/declarative/qsggridview/data/setindex.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/snapToRow.qml (renamed from tests/auto/declarative/qsggridview/data/snapToRow.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/qquickgridview.pro (renamed from tests/auto/declarative/qsggridview/qsggridview.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp (renamed from tests/auto/declarative/qsggridview/tst_qsggridview.cpp) | 758 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/aspectratio.qml (renamed from tests/auto/declarative/qsgimage/data/aspectratio.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/big.jpeg (renamed from tests/auto/declarative/qsgimage/data/big.jpeg) | bin | 1700081 -> 1700081 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/big256.png (renamed from tests/auto/declarative/qsgimage/data/big256.png) | bin | 3566 -> 3566 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/colors.png (renamed from tests/auto/declarative/qsgimage/data/colors.png) | bin | 1655 -> 1655 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/colors1.png (renamed from tests/auto/declarative/qsgimage/data/colors1.png) | bin | 1655 -> 1655 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/green.png (renamed from tests/auto/declarative/qsgimage/data/green.png) | bin | 314 -> 314 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart-win32.png (renamed from tests/auto/declarative/qsgimage/data/heart-win32.png) | bin | 12621 -> 12621 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart.png (renamed from tests/auto/declarative/qsgimage/data/heart.png) | bin | 12577 -> 12577 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart.svg (renamed from tests/auto/declarative/qsgimage/data/heart.svg) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart200-win32.png (renamed from tests/auto/declarative/qsgimage/data/heart200-win32.png) | bin | 8062 -> 8062 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart200.png (renamed from tests/auto/declarative/qsgimage/data/heart200.png) | bin | 8063 -> 8063 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/htiling.qml (renamed from tests/auto/declarative/qsgimage/data/htiling.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/mirror.qml (renamed from tests/auto/declarative/qsgimage/data/mirror.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/nullpixmap.qml (renamed from tests/auto/declarative/qsgimage/data/nullpixmap.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/pattern.png (renamed from tests/auto/declarative/qsgimage/data/pattern.png) | bin | 1371 -> 1371 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/qtbug_16389.qml (renamed from tests/auto/declarative/qsgimage/data/qtbug_16389.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/rect.png (renamed from tests/auto/declarative/qsgimage/data/rect.png) | bin | 171 -> 171 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/vtiling.qml (renamed from tests/auto/declarative/qsgimage/data/vtiling.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/qquickimage.pro (renamed from tests/auto/declarative/qsgimage/qsgimage.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/tst_qquickimage.cpp (renamed from tests/auto/declarative/qsgimage/tst_qsgimage.cpp) | 168 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem/qquickitem.pro (renamed from tests/auto/declarative/qsgitem/qsgitem.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem/tst_qquickitem.cpp (renamed from tests/auto/declarative/qsgitem/tst_qsgitem.cpp) | 244 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenProperty.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenProperty.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenRect.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenRect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenRectBug.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenRectBug.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenRectBug2.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenRectBug2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenRectBug3.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenRectBug3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/implicitsize.qml (renamed from tests/auto/declarative/qsgitem2/data/implicitsize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/keynavigationtest.qml (renamed from tests/auto/declarative/qsgitem2/data/keynavigationtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/keynavigationtest_implicit.qml (renamed from tests/auto/declarative/qsgitem2/data/keynavigationtest_implicit.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/keyspriority.qml (renamed from tests/auto/declarative/qsgitem2/data/keyspriority.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/keystest.qml (renamed from tests/auto/declarative/qsgitem2/data/keystest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/layoutmirroring.qml (renamed from tests/auto/declarative/qsgitem2/data/layoutmirroring.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/mapCoordinates.qml (renamed from tests/auto/declarative/qsgitem2/data/mapCoordinates.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/propertychanges.qml (renamed from tests/auto/declarative/qsgitem2/data/propertychanges.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/qtbug_16871.qml (renamed from tests/auto/declarative/qsgitem2/data/qtbug_16871.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/resourcesProperty.qml (renamed from tests/auto/declarative/qsgitem2/data/resourcesProperty.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/transformCrash.qml (renamed from tests/auto/declarative/qsgitem2/data/transformCrash.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/qquickitem2.pro (renamed from tests/auto/declarative/qsgitem2/qsgitem2.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/tst_qquickitem.cpp (renamed from tests/auto/declarative/qsgitem2/tst_qsgitem.cpp) | 270 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/ComponentView.qml (renamed from tests/auto/declarative/qsglistview/data/ComponentView.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/attachedSignals.qml (renamed from tests/auto/declarative/qsglistview/data/attachedSignals.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/creationContext.qml (renamed from tests/auto/declarative/qsglistview/data/creationContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/displaylist.qml (renamed from tests/auto/declarative/qsglistview/data/displaylist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/fillModelOnComponentCompleted.qml (renamed from tests/auto/declarative/qsglistview/data/fillModelOnComponentCompleted.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/footer.qml (renamed from tests/auto/declarative/qsglistview/data/footer.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/header.qml (renamed from tests/auto/declarative/qsglistview/data/header.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/headerfooter.qml (renamed from tests/auto/declarative/qsglistview/data/headerfooter.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/itemlist.qml (renamed from tests/auto/declarative/qsglistview/data/itemlist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-enforcerange-nohighlight.qml (renamed from tests/auto/declarative/qsglistview/data/listview-enforcerange-nohighlight.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-enforcerange.qml (renamed from tests/auto/declarative/qsglistview/data/listview-enforcerange.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-initCurrent.qml (renamed from tests/auto/declarative/qsglistview/data/listview-initCurrent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-noCurrent.qml (renamed from tests/auto/declarative/qsglistview/data/listview-noCurrent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-sections.qml (renamed from tests/auto/declarative/qsglistview/data/listview-sections.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-sections_delegate.qml (renamed from tests/auto/declarative/qsglistview/data/listview-sections_delegate.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listviewtest.qml (renamed from tests/auto/declarative/qsglistview/data/listviewtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/manual-highlight.qml (renamed from tests/auto/declarative/qsglistview/data/manual-highlight.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/margins.qml (renamed from tests/auto/declarative/qsglistview/data/margins.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/propertychangestest.qml (renamed from tests/auto/declarative/qsglistview/data/propertychangestest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/qtbug-21742.qml (renamed from tests/auto/declarative/qsglistview/data/qtbug-21742.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/qtbug14821.qml (renamed from tests/auto/declarative/qsglistview/data/qtbug14821.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/qtbug16037.qml (renamed from tests/auto/declarative/qsglistview/data/qtbug16037.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/resizeview.qml (renamed from tests/auto/declarative/qsglistview/data/resizeview.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/rightToLeft.qml (renamed from tests/auto/declarative/qsglistview/data/rightToLeft.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/sizelessthan1.qml (renamed from tests/auto/declarative/qsglistview/data/sizelessthan1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/snapToItem.qml (renamed from tests/auto/declarative/qsglistview/data/snapToItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/strictlyenforcerange.qml (renamed from tests/auto/declarative/qsglistview/data/strictlyenforcerange.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/incrementalmodel.cpp (renamed from tests/auto/declarative/qsglistview/incrementalmodel.cpp) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/incrementalmodel.h (renamed from tests/auto/declarative/qsglistview/incrementalmodel.h) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/qquicklistview.pro (renamed from tests/auto/declarative/qsglistview/qsglistview.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/tst_qquicklistview.cpp (renamed from tests/auto/declarative/qsglistview/tst_qsglistview.cpp) | 972 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/ActiveComponent.qml (renamed from tests/auto/declarative/qsgloader/data/ActiveComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/AnchoredLoader.qml (renamed from tests/auto/declarative/qsgloader/data/AnchoredLoader.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/BigComponent.qml (renamed from tests/auto/declarative/qsgloader/data/BigComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/BlueRect.qml (renamed from tests/auto/declarative/qsgloader/data/BlueRect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/CreationContextLoader.qml (renamed from tests/auto/declarative/qsgloader/data/CreationContextLoader.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/GraphicsWidget250x250.qml (renamed from tests/auto/declarative/qsgloader/data/GraphicsWidget250x250.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/GreenRect.qml (renamed from tests/auto/declarative/qsgloader/data/GreenRect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/InitialPropertyValuesComponent.qml (renamed from tests/auto/declarative/qsgloader/data/InitialPropertyValuesComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/InvalidSourceComponent.qml (renamed from tests/auto/declarative/qsgloader/data/InvalidSourceComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/NoResize.qml (renamed from tests/auto/declarative/qsgloader/data/NoResize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/NoResizeGraphicsWidget.qml (renamed from tests/auto/declarative/qsgloader/data/NoResizeGraphicsWidget.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/QTBUG_16928.qml (renamed from tests/auto/declarative/qsgloader/data/QTBUG_16928.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/QTBUG_17114.qml (renamed from tests/auto/declarative/qsgloader/data/QTBUG_17114.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/Rect120x60.qml (renamed from tests/auto/declarative/qsgloader/data/Rect120x60.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SetSourceComponent.qml (renamed from tests/auto/declarative/qsgloader/data/SetSourceComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SizeGraphicsWidgetToLoader.qml (renamed from tests/auto/declarative/qsgloader/data/SizeGraphicsWidgetToLoader.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SizeLoaderToGraphicsWidget.qml (renamed from tests/auto/declarative/qsgloader/data/SizeLoaderToGraphicsWidget.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SizeToItem.qml (renamed from tests/auto/declarative/qsgloader/data/SizeToItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SizeToLoader.qml (renamed from tests/auto/declarative/qsgloader/data/SizeToLoader.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/VmeError.qml (renamed from tests/auto/declarative/qsgloader/data/VmeError.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.1.qml (renamed from tests/auto/declarative/qsgloader/data/active.1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.2.qml (renamed from tests/auto/declarative/qsgloader/data/active.2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.3.qml (renamed from tests/auto/declarative/qsgloader/data/active.3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.4.qml (renamed from tests/auto/declarative/qsgloader/data/active.4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.5.qml (renamed from tests/auto/declarative/qsgloader/data/active.5.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.6.qml (renamed from tests/auto/declarative/qsgloader/data/active.6.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.7.qml (renamed from tests/auto/declarative/qsgloader/data/active.7.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.8.qml (renamed from tests/auto/declarative/qsgloader/data/active.8.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/asynchronous.qml (renamed from tests/auto/declarative/qsgloader/data/asynchronous.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/crash.qml (renamed from tests/auto/declarative/qsgloader/data/crash.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/creationContext.qml (renamed from tests/auto/declarative/qsgloader/data/creationContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/differentorigin.qml (renamed from tests/auto/declarative/qsgloader/data/differentorigin.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/implicitSize.qml (renamed from tests/auto/declarative/qsgloader/data/implicitSize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.1.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.2.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.3.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.4.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.5.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.5.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.6.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.6.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.7.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.7.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.8.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.8.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.binding.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.binding.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.error.1.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.error.1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.error.2.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.error.2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.error.3.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.error.3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.error.4.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.error.4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/nonItem.qml (renamed from tests/auto/declarative/qsgloader/data/nonItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/qmldir (renamed from tests/auto/declarative/qsgloader/data/qmldir) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/sameorigin-load.qml (renamed from tests/auto/declarative/qsgloader/data/sameorigin-load.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/sameorigin.qml (renamed from tests/auto/declarative/qsgloader/data/sameorigin.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/vmeErrors.qml (renamed from tests/auto/declarative/qsgloader/data/vmeErrors.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/qquickloader.pro (renamed from tests/auto/declarative/qsgloader/qsgloader.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/tst_qquickloader.cpp (renamed from tests/auto/declarative/qsgloader/tst_qsgloader.cpp) | 214 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/clickThrough.qml (renamed from tests/auto/declarative/qsgmousearea/data/clickThrough.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/clickThrough2.qml (renamed from tests/auto/declarative/qsgmousearea/data/clickThrough2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/clickandhold.qml (renamed from tests/auto/declarative/qsgmousearea/data/clickandhold.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/clicktwice.qml (renamed from tests/auto/declarative/qsgmousearea/data/clicktwice.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/doubleclick.qml (renamed from tests/auto/declarative/qsgmousearea/data/doubleclick.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/dragging.qml (renamed from tests/auto/declarative/qsgmousearea/data/dragging.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/dragproperties.qml (renamed from tests/auto/declarative/qsgmousearea/data/dragproperties.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/dragreset.qml (renamed from tests/auto/declarative/qsgmousearea/data/dragreset.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/hoverPosition.qml (renamed from tests/auto/declarative/qsgmousearea/data/hoverPosition.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/hoverPropagation.qml (renamed from tests/auto/declarative/qsgmousearea/data/hoverPropagation.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/noclickandhold.qml (renamed from tests/auto/declarative/qsgmousearea/data/noclickandhold.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/pressedCanceled.qml (renamed from tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/pressedOrdering.qml (renamed from tests/auto/declarative/qsgmousearea/data/pressedOrdering.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/preventstealing.qml (renamed from tests/auto/declarative/qsgmousearea/data/preventstealing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/rejectEvent.qml (renamed from tests/auto/declarative/qsgmousearea/data/rejectEvent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/updateMousePosOnClick.qml (renamed from tests/auto/declarative/qsgmousearea/data/updateMousePosOnClick.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/updateMousePosOnResize.qml (renamed from tests/auto/declarative/qsgmousearea/data/updateMousePosOnResize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/qquickmousearea.pro (renamed from tests/auto/declarative/qsgmousearea/qsgmousearea.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/tst_qquickmousearea.cpp (renamed from tests/auto/declarative/qsgmousearea/tst_qsgmousearea.cpp) | 138 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/ComponentView.qml (renamed from tests/auto/declarative/qsgpathview/data/ComponentView.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/closedPath.qml (renamed from tests/auto/declarative/qsgpathview/data/closedPath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/creationContext.qml (renamed from tests/auto/declarative/qsgpathview/data/creationContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/datamodel.qml (renamed from tests/auto/declarative/qsgpathview/data/datamodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/displaypath.qml (renamed from tests/auto/declarative/qsgpathview/data/displaypath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/dragpath.qml (renamed from tests/auto/declarative/qsgpathview/data/dragpath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/emptymodel.qml (renamed from tests/auto/declarative/qsgpathview/data/emptymodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/missingPercent.qml (renamed from tests/auto/declarative/qsgpathview/data/missingPercent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/openPath.qml (renamed from tests/auto/declarative/qsgpathview/data/openPath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathUpdate.qml (renamed from tests/auto/declarative/qsgpathview/data/pathUpdate.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathUpdateOnStartChanged.qml (renamed from tests/auto/declarative/qsgpathview/data/pathUpdateOnStartChanged.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathtest.qml (renamed from tests/auto/declarative/qsgpathview/data/pathtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview0.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview0.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview1.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview2.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview3.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview_package.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview_package.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/propertychanges.qml (renamed from tests/auto/declarative/qsgpathview/data/propertychanges.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/treemodel.qml (renamed from tests/auto/declarative/qsgpathview/data/treemodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/undefinedpath.qml (renamed from tests/auto/declarative/qsgpathview/data/undefinedpath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/vdm.qml (renamed from tests/auto/declarative/qsgpathview/data/vdm.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/qquickpathview.pro (renamed from tests/auto/declarative/qsgpathview/qsgpathview.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/tst_qquickpathview.cpp (renamed from tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp) | 272 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpincharea/data/pinchproperties.qml (renamed from tests/auto/declarative/qsgpincharea/data/pinchproperties.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpincharea/qquickpincharea.pro (renamed from tests/auto/declarative/qsgpincharea/qsgpincharea.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpincharea/tst_qquickpincharea.cpp (renamed from tests/auto/declarative/qsgpincharea/tst_qsgpincharea.cpp) | 84 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/allInvisible.qml (renamed from tests/auto/declarative/qsgpositioners/data/allInvisible.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-column.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-column.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-dynamic.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-dynamic.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-flow.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-flow.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-grid.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-grid.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-row.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-row.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/flow-testimplicitsize.qml (renamed from tests/auto/declarative/qsgpositioners/data/flow-testimplicitsize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/flowtest-toptobottom.qml (renamed from tests/auto/declarative/qsgpositioners/data/flowtest-toptobottom.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/flowtest.qml (renamed from tests/auto/declarative/qsgpositioners/data/flowtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/grid-animated.qml (renamed from tests/auto/declarative/qsgpositioners/data/grid-animated.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/grid-row-column-spacing.qml (renamed from tests/auto/declarative/qsgpositioners/data/grid-row-column-spacing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/grid-spacing.qml (renamed from tests/auto/declarative/qsgpositioners/data/grid-spacing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/grid-toptobottom.qml (renamed from tests/auto/declarative/qsgpositioners/data/grid-toptobottom.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/gridtest.qml (renamed from tests/auto/declarative/qsgpositioners/data/gridtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/gridzerocolumns.qml (renamed from tests/auto/declarative/qsgpositioners/data/gridzerocolumns.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/horizontal-animated-disabled.qml (renamed from tests/auto/declarative/qsgpositioners/data/horizontal-animated-disabled.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/horizontal-animated.qml (renamed from tests/auto/declarative/qsgpositioners/data/horizontal-animated.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/horizontal-spacing.qml (renamed from tests/auto/declarative/qsgpositioners/data/horizontal-spacing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/horizontal.qml (renamed from tests/auto/declarative/qsgpositioners/data/horizontal.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/propertychangestest.qml (renamed from tests/auto/declarative/qsgpositioners/data/propertychangestest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/rectangleComponent.qml (renamed from tests/auto/declarative/qsgpositioners/data/rectangleComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/repeatertest.qml (renamed from tests/auto/declarative/qsgpositioners/data/repeatertest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/vertical-animated.qml (renamed from tests/auto/declarative/qsgpositioners/data/vertical-animated.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/vertical-spacing.qml (renamed from tests/auto/declarative/qsgpositioners/data/vertical-spacing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/vertical.qml (renamed from tests/auto/declarative/qsgpositioners/data/vertical.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/qquickpositioners.pro (renamed from tests/auto/declarative/qsgpositioners/qsgpositioners.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/tst_qquickpositioners.cpp (renamed from tests/auto/declarative/qsgpositioners/tst_qsgpositioners.cpp) | 468 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/intmodel.qml (renamed from tests/auto/declarative/qsgrepeater/data/intmodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/itemlist.qml (renamed from tests/auto/declarative/qsgrepeater/data/itemlist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/modelChanged.qml (renamed from tests/auto/declarative/qsgrepeater/data/modelChanged.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/objlist.qml (renamed from tests/auto/declarative/qsgrepeater/data/objlist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/properties.qml (renamed from tests/auto/declarative/qsgrepeater/data/properties.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/repeater1.qml (renamed from tests/auto/declarative/qsgrepeater/data/repeater1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/repeater2.qml (renamed from tests/auto/declarative/qsgrepeater/data/repeater2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/qquickrepeater.pro (renamed from tests/auto/declarative/qsgrepeater/qsgrepeater.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/tst_qquickrepeater.cpp (renamed from tests/auto/declarative/qsgrepeater/tst_qsgrepeater.cpp) | 150 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments.qml (renamed from tests/auto/declarative/qsgtext/data/alignments.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_cb.png (renamed from tests/auto/declarative/qsgtext/data/alignments_cb.png) | bin | 496 -> 496 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_cc.png (renamed from tests/auto/declarative/qsgtext/data/alignments_cc.png) | bin | 556 -> 556 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_ct.png (renamed from tests/auto/declarative/qsgtext/data/alignments_ct.png) | bin | 533 -> 533 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_lb.png (renamed from tests/auto/declarative/qsgtext/data/alignments_lb.png) | bin | 496 -> 496 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_lc.png (renamed from tests/auto/declarative/qsgtext/data/alignments_lc.png) | bin | 535 -> 535 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_lt.png (renamed from tests/auto/declarative/qsgtext/data/alignments_lt.png) | bin | 514 -> 514 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_rb.png (renamed from tests/auto/declarative/qsgtext/data/alignments_rb.png) | bin | 505 -> 505 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_rc.png (renamed from tests/auto/declarative/qsgtext/data/alignments_rc.png) | bin | 559 -> 559 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_rt.png (renamed from tests/auto/declarative/qsgtext/data/alignments_rt.png) | bin | 539 -> 539 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/embeddedImagesLocal.qml (renamed from tests/auto/declarative/qsgtext/data/embeddedImagesLocal.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/embeddedImagesLocalError.qml (renamed from tests/auto/declarative/qsgtext/data/embeddedImagesLocalError.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/embeddedImagesRemote.qml (renamed from tests/auto/declarative/qsgtext/data/embeddedImagesRemote.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/embeddedImagesRemoteError.qml (renamed from tests/auto/declarative/qsgtext/data/embeddedImagesRemoteError.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/horizontalAlignment_RightToLeft.qml (renamed from tests/auto/declarative/qsgtext/data/horizontalAlignment_RightToLeft.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/http/exists.png (renamed from tests/auto/declarative/qsgtext/data/http/exists.png) | bin | 2738 -> 2738 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/lineCount.qml (renamed from tests/auto/declarative/qsgtext/data/lineCount.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/lineHeight.qml (renamed from tests/auto/declarative/qsgtext/data/lineHeight.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/lineLayout.qml (renamed from tests/auto/declarative/qsgtext/data/lineLayout.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/qtbug_14734.qml (renamed from tests/auto/declarative/qsgtext/data/qtbug_14734.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/rotated.qml (renamed from tests/auto/declarative/qsgtext/data/rotated.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/qquicktext.pro (renamed from tests/auto/declarative/qsgtext/qsgtext.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/tst_qquicktext.cpp (renamed from tests/auto/declarative/qsgtext/tst_qsgtext.cpp) | 332 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/CursorRect.qml (renamed from tests/auto/declarative/qsgtextedit/data/CursorRect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments.qml (renamed from tests/auto/declarative/qsgtextedit/data/alignments.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_cb.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_cb.png) | bin | 496 -> 496 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_cc.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_cc.png) | bin | 556 -> 556 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_ct.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_ct.png) | bin | 533 -> 533 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_lb.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_lb.png) | bin | 496 -> 496 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_lc.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_lc.png) | bin | 535 -> 535 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_lt.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_lt.png) | bin | 514 -> 514 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_rb.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_rb.png) | bin | 505 -> 505 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_rc.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_rc.png) | bin | 559 -> 559 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_rt.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_rt.png) | bin | 539 -> 539 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/cursorTest.qml (renamed from tests/auto/declarative/qsgtextedit/data/cursorTest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/cursorVisible.qml (renamed from tests/auto/declarative/qsgtextedit/data/cursorVisible.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/geometrySignals.qml (renamed from tests/auto/declarative/qsgtextedit/data/geometrySignals.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/horizontalAlignment_RightToLeft.qml (renamed from tests/auto/declarative/qsgtextedit/data/horizontalAlignment_RightToLeft.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/ErrItem.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/ErrItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/NormItem.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/NormItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/cursorHttpTest.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/cursorHttpTest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/cursorHttpTestFail1.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/cursorHttpTestFail1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/cursorHttpTestFail2.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/cursorHttpTestFail2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/cursorHttpTestPass.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/cursorHttpTestPass.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/qmldir (renamed from tests/auto/declarative/qsgtextedit/data/http/qmldir) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/httpfail/FailItem.qml (renamed from tests/auto/declarative/qsgtextedit/data/httpfail/FailItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/httpslow/WaitItem.qml (renamed from tests/auto/declarative/qsgtextedit/data/httpslow/WaitItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/inputContext.qml (renamed from tests/auto/declarative/qsgtextedit/data/inputContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/inputMethodEvent.qml (renamed from tests/auto/declarative/qsgtextedit/data/inputMethodEvent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/inputmethodhints.qml (renamed from tests/auto/declarative/qsgtextedit/data/inputmethodhints.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_default.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_default.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_false.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_false.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_false_words.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_false_words.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_true.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_true.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_true_words.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_true_words.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselectionmode_characters.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselectionmode_characters.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselectionmode_default.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselectionmode_default.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselectionmode_words.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselectionmode_words.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/navigation.qml (renamed from tests/auto/declarative/qsgtextedit/data/navigation.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/openInputPanel.qml (renamed from tests/auto/declarative/qsgtextedit/data/openInputPanel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/positionAt.qml (renamed from tests/auto/declarative/qsgtextedit/data/positionAt.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/qtbug-22058.qml (renamed from tests/auto/declarative/qsgtextedit/data/qtbug-22058.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/readOnly.qml (renamed from tests/auto/declarative/qsgtextedit/data/readOnly.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/qquicktextedit.pro (renamed from tests/auto/declarative/qsgtextedit/qsgtextedit.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/tst_qquicktextedit.cpp (renamed from tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp) | 528 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/cursorTest.qml (renamed from tests/auto/declarative/qsgtextinput/data/cursorTest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/cursorVisible.qml (renamed from tests/auto/declarative/qsgtextinput/data/cursorVisible.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/echoMode.qml (renamed from tests/auto/declarative/qsgtextinput/data/echoMode.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/geometrySignals.qml (renamed from tests/auto/declarative/qsgtextinput/data/geometrySignals.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/halign_center.png (renamed from tests/auto/declarative/qsgtextinput/data/halign_center.png) | bin | 293 -> 293 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/halign_left.png (renamed from tests/auto/declarative/qsgtextinput/data/halign_left.png) | bin | 291 -> 291 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/halign_right.png (renamed from tests/auto/declarative/qsgtextinput/data/halign_right.png) | bin | 292 -> 292 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/horizontalAlignment.qml (renamed from tests/auto/declarative/qsgtextinput/data/horizontalAlignment.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/horizontalAlignment_RightToLeft.qml (renamed from tests/auto/declarative/qsgtextinput/data/horizontalAlignment_RightToLeft.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/inputContext.qml (renamed from tests/auto/declarative/qsgtextinput/data/inputContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/inputMethodEvent.qml (renamed from tests/auto/declarative/qsgtextinput/data/inputMethodEvent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/inputmethods.qml (renamed from tests/auto/declarative/qsgtextinput/data/inputmethods.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/masks.qml (renamed from tests/auto/declarative/qsgtextinput/data/masks.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/maxLength.qml (renamed from tests/auto/declarative/qsgtextinput/data/maxLength.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/mouseselection_true.qml (renamed from tests/auto/declarative/qsgtextinput/data/mouseselection_true.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/mouseselectionmode_characters.qml (renamed from tests/auto/declarative/qsgtextinput/data/mouseselectionmode_characters.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/mouseselectionmode_default.qml (renamed from tests/auto/declarative/qsgtextinput/data/mouseselectionmode_default.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/mouseselectionmode_words.qml (renamed from tests/auto/declarative/qsgtextinput/data/mouseselectionmode_words.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/navigation.qml (renamed from tests/auto/declarative/qsgtextinput/data/navigation.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/openInputPanel.qml (renamed from tests/auto/declarative/qsgtextinput/data/openInputPanel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/positionAt.qml (renamed from tests/auto/declarative/qsgtextinput/data/positionAt.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/preeditAutoScroll.qml (renamed from tests/auto/declarative/qsgtextinput/data/preeditAutoScroll.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/qtbug-19956double.qml (renamed from tests/auto/declarative/qsgtextinput/data/qtbug-19956double.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/qtbug-19956int.qml (renamed from tests/auto/declarative/qsgtextinput/data/qtbug-19956int.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/qtbug-19956regexp.qml (renamed from tests/auto/declarative/qsgtextinput/data/qtbug-19956regexp.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/readOnly.qml (renamed from tests/auto/declarative/qsgtextinput/data/readOnly.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/validators.qml (renamed from tests/auto/declarative/qsgtextinput/data/validators.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/qquicktextinput.pro (renamed from tests/auto/declarative/qsgtextinput/qsgtextinput.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/tst_qquicktextinput.cpp (renamed from tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp) | 530 | ||||
-rw-r--r-- | tests/auto/declarative/qquickview/data/error1.qml (renamed from tests/auto/declarative/qsgview/data/error1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickview/data/resizemodeitem.qml (renamed from tests/auto/declarative/qsgview/data/resizemodeitem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickview/qquickview.pro (renamed from tests/auto/declarative/qsgview/qsgview.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickview/tst_qquickview.cpp (renamed from tests/auto/declarative/qsgview/tst_qsgview.cpp) | 44 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/create.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/create.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/datalist.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/datalist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/groups.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/groups.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/modelproperties.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/modelproperties.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/modelproperties2.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/modelproperties2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/objectlist.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/objectlist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/singlerole1.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/singlerole1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/singlerole2.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/singlerole2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/visualdatamodel.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/visualdatamodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/qquickvisualdatamodel.pro (renamed from tests/auto/declarative/qsgvisualdatamodel/qsgvisualdatamodel.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp (renamed from tests/auto/declarative/qsgvisualdatamodel/tst_qsgvisualdatamodel.cpp) | 284 | ||||
-rw-r--r-- | tests/auto/particles/qsgage/tst_qsgage.cpp | 8 | ||||
-rw-r--r-- | tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgcumulativedirection/tst_qsgcumulativedirection.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgcustomaffector/tst_qsgcustomaffector.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgcustomparticle/tst_qsgcustomparticle.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgellipseextruder/tst_qsgellipseextruder.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgfriction/tst_qsgfriction.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsggravity/tst_qsggravity.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgimageparticle/tst_qsgimageparticle.cpp | 10 | ||||
-rw-r--r-- | tests/auto/particles/qsgitemparticle/tst_qsgitemparticle.cpp | 6 | ||||
-rw-r--r-- | tests/auto/particles/qsglineextruder/tst_qsglineextruder.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgmaskextruder/tst_qsgmaskextruder.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgparticlegroup/tst_qsgparticlegroup.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgparticlesystem/tst_qsgparticlesystem.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgpointattractor/tst_qsgpointattractor.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgpointdirection/tst_qsgpointdirection.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgrectangleextruder/tst_qsgrectangleextruder.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgtargetdirection/tst_qsgtargetdirection.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgtrailemitter/tst_qsgtrailemitter.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgturbulence/tst_qsgturbulence.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgwander/tst_qsgwander.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/shared/particlestestsshared.h | 8 | ||||
-rw-r--r-- | tests/auto/qmltest/borderimage/tst_borderimage.qml | 4 | ||||
-rw-r--r-- | tests/benchmarks/particles/affectors/tst_affectors.cpp | 4 | ||||
-rw-r--r-- | tests/benchmarks/particles/emission/tst_emission.cpp | 2 |
481 files changed, 3709 insertions, 3703 deletions
diff --git a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp b/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp index 8e31303aa4..65333cca2b 100644 --- a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp +++ b/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp @@ -50,7 +50,7 @@ #include <QtDeclarative/qdeclarativecomponent.h> #include <QtDeclarative/qdeclarativeexpression.h> #include <QtDeclarative/qdeclarativeproperty.h> -#include <QtDeclarative/qsgitem.h> +#include <QtDeclarative/qquickitem.h> #include <private/qdeclarativebinding_p.h> #include <private/qdeclarativeenginedebug_p.h> @@ -80,7 +80,7 @@ private: QDeclarativeDebugConnection *m_conn; QDeclarativeEngineDebug *m_dbg; QDeclarativeEngine *m_engine; - QSGItem *m_rootItem; + QQuickItem *m_rootItem; QObjectList m_components; @@ -224,7 +224,7 @@ void tst_QDeclarativeEngineDebug::recursiveObjectTest(QObject *o, const QDeclara QCOMPARE(p.value(), pmeta.read(o)); if (p.name() == "parent") - QVERIFY(p.valueTypeName() == "QGraphicsObject*" || p.valueTypeName() == "QSGItem*"); + QVERIFY(p.valueTypeName() == "QGraphicsObject*" || p.valueTypeName() == "QQuickItem*"); else QCOMPARE(p.valueTypeName(), QString::fromUtf8(pmeta.typeName())); @@ -362,9 +362,9 @@ void tst_QDeclarativeEngineDebug::initTestCase() QDeclarativeComponent component(m_engine); component.setData(qml[i], QUrl::fromLocalFile("")); QVERIFY(component.isReady()); // fails if bad syntax - m_components << qobject_cast<QSGItem*>(component.create()); + m_components << qobject_cast<QQuickItem*>(component.create()); } - m_rootItem = qobject_cast<QSGItem*>(m_components.first()); + m_rootItem = qobject_cast<QQuickItem*>(m_components.first()); // add an extra context to test for multiple contexts QDeclarativeContext *context = new QDeclarativeContext(m_engine->rootContext(), this); diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 0d9459f81b..cd4309486f 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -61,32 +61,32 @@ PRIVATETESTS += \ # This test requires the xmlpatterns module !contains(QT_CONFIG,xmlpatterns):PRIVATETESTS -= qdeclarativexmllistmodel -SGTESTS = \ - qsganimatedimage \ - qsgborderimage \ - qsgcanvas \ - qsgdrag \ - qsgdroparea \ - qsgflickable \ - qsgflipable \ - qsgfocusscope \ - qsggridview \ - qsgimage \ - qsgitem \ - qsgitem2 \ - qsglistview \ - qsgloader \ - qsgmousearea \ - qsgpathview \ - qsgpincharea \ - qsgpositioners \ - qsgrepeater \ - qsgtext \ - qsgtextedit \ - qsgtextinput \ - qsgvisualdatamodel \ - qsgview \ - qsgcanvasitem \ +QUICKTESTS = \ + qquickanimatedimage \ + qquickborderimage \ + qquickcanvas \ + qquickdrag \ + qquickdroparea \ + qquickflickable \ + qquickflipable \ + qquickfocusscope \ + qquickgridview \ + qquickimage \ + qquickitem \ + qquickitem2 \ + qquicklistview \ + qquickloader \ + qquickmousearea \ + qquickpathview \ + qquickpincharea \ + qquickpositioners \ + qquickrepeater \ + qquicktext \ + qquicktextedit \ + qquicktextinput \ + qquickvisualdatamodel \ + qquickview \ + qquickcanvasitem \ SUBDIRS += $$PUBLICTESTS @@ -95,5 +95,5 @@ SUBDIRS += debugger contains(QT_CONFIG, private_tests) { SUBDIRS += $$PRIVATETESTS - SUBDIRS += $$SGTESTS + SUBDIRS += $$QUICKTESTS } diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index 58f16a49d6..c14d41ac48 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -44,7 +44,7 @@ #include <QDir> #include <QProcess> #include <QDebug> -#include <QSGView> +#include <QQuickView> #include <QDeclarativeError> class tst_examples : public QObject @@ -72,7 +72,7 @@ tst_examples::tst_examples() excludedDirs << "examples/declarative/text/fonts"; // QTBUG-21415 #endif - // Not run in QSGView + // Not run in QQuickView excludedDirs << "examples/declarative/qtquick1"; // These snippets are not expected to run on their own. @@ -207,16 +207,16 @@ void tst_examples::sgexamples() { QFETCH(QString, file); - QSGView view; + QQuickView view; QtMsgHandler old = qInstallMsgHandler(silentErrorsMsgHandler); view.setSource(file); qInstallMsgHandler(old); - if (view.status() == QSGView::Error) + if (view.status() == QQuickView::Error) qWarning() << view.errors(); - QCOMPARE(view.status(), QSGView::Ready); + QCOMPARE(view.status(), QQuickView::Ready); view.show(); QTest::qWait(100); diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp index 9d3f41563d..515c8fa918 100644 --- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp +++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp @@ -41,13 +41,13 @@ #include <QtTest/QtTest> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgview.h> -#include <QtDeclarative/private/qsgrectangle_p.h> +#include <QtDeclarative/qquickview.h> +#include <QtDeclarative/private/qquickrectangle_p.h> #include <QtDeclarative/private/qdeclarativeanimation_p.h> #include <QtDeclarative/private/qdeclarativetransition_p.h> -#include <QtDeclarative/private/qsganimation_p.h> +#include <QtDeclarative/private/qquickanimation_p.h> #include <QtDeclarative/private/qdeclarativepathinterpolator_p.h> -#include <QtDeclarative/private/qsgitem_p.h> +#include <QtDeclarative/private/qquickitem_p.h> #include <QVariantAnimation> #include <QEasingCurve> @@ -111,7 +111,7 @@ private slots: void tst_qdeclarativeanimations::simpleProperty() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativePropertyAnimation animation; animation.setTarget(&rect); animation.setProperty("x"); @@ -136,7 +136,7 @@ void tst_qdeclarativeanimations::simpleProperty() void tst_qdeclarativeanimations::simpleNumber() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativeNumberAnimation animation; animation.setTarget(&rect); animation.setProperty("x"); @@ -161,7 +161,7 @@ void tst_qdeclarativeanimations::simpleNumber() void tst_qdeclarativeanimations::simpleColor() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativeColorAnimation animation; animation.setTarget(&rect); animation.setProperty("color"); @@ -195,7 +195,7 @@ void tst_qdeclarativeanimations::simpleColor() void tst_qdeclarativeanimations::simpleRotation() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativeRotationAnimation animation; animation.setTarget(&rect); animation.setProperty("rotation"); @@ -224,12 +224,12 @@ void tst_qdeclarativeanimations::simplePath() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("pathAnimation.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *redRect = rect->findChild<QSGRectangle*>(); + QQuickRectangle *redRect = rect->findChild<QQuickRectangle*>(); QVERIFY(redRect); - QSGPathAnimation *pathAnim = rect->findChild<QSGPathAnimation*>(); + QQuickPathAnimation *pathAnim = rect->findChild<QQuickPathAnimation*>(); QVERIFY(pathAnim); pathAnim->start(); @@ -250,8 +250,8 @@ void tst_qdeclarativeanimations::simplePath() QTRY_COMPARE(redRect->x(), qreal(300)); QCOMPARE(redRect->y(), qreal(300)); - pathAnim->setOrientation(QSGPathAnimation::RightFirst); - QCOMPARE(pathAnim->orientation(), QSGPathAnimation::RightFirst); + pathAnim->setOrientation(QQuickPathAnimation::RightFirst); + QCOMPARE(pathAnim->orientation(), QQuickPathAnimation::RightFirst); pathAnim->start(); QTRY_VERIFY(redRect->rotation() != 0); pathAnim->stop(); @@ -260,15 +260,15 @@ void tst_qdeclarativeanimations::simplePath() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("pathAnimation2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *redRect = rect->findChild<QSGRectangle*>(); + QQuickRectangle *redRect = rect->findChild<QQuickRectangle*>(); QVERIFY(redRect); - QSGPathAnimation *pathAnim = rect->findChild<QSGPathAnimation*>(); + QQuickPathAnimation *pathAnim = rect->findChild<QQuickPathAnimation*>(); QVERIFY(pathAnim); - QCOMPARE(pathAnim->orientation(), QSGPathAnimation::RightFirst); + QCOMPARE(pathAnim->orientation(), QQuickPathAnimation::RightFirst); pathAnim->start(); pathAnim->pause(); @@ -349,12 +349,12 @@ void tst_qdeclarativeanimations::pathWithNoStart() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("pathAnimationNoStart.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *redRect = rect->findChild<QSGRectangle*>(); + QQuickRectangle *redRect = rect->findChild<QQuickRectangle*>(); QVERIFY(redRect); - QSGPathAnimation *pathAnim = rect->findChild<QSGPathAnimation*>(); + QQuickPathAnimation *pathAnim = rect->findChild<QQuickPathAnimation*>(); QVERIFY(pathAnim); pathAnim->start(); @@ -381,7 +381,7 @@ void tst_qdeclarativeanimations::pathWithNoStart() void tst_qdeclarativeanimations::alwaysRunToEnd() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativePropertyAnimation animation; animation.setTarget(&rect); animation.setProperty("x"); @@ -401,7 +401,7 @@ void tst_qdeclarativeanimations::alwaysRunToEnd() void tst_qdeclarativeanimations::complete() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativePropertyAnimation animation; animation.setTarget(&rect); animation.setProperty("x"); @@ -422,7 +422,7 @@ void tst_qdeclarativeanimations::complete() void tst_qdeclarativeanimations::resume() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativePropertyAnimation animation; animation.setTarget(&rect); animation.setProperty("x"); @@ -449,7 +449,7 @@ void tst_qdeclarativeanimations::resume() void tst_qdeclarativeanimations::dotProperty() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativeNumberAnimation animation; animation.setTarget(&rect); animation.setProperty("border.width"); @@ -470,7 +470,7 @@ void tst_qdeclarativeanimations::badTypes() { //don't crash { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("badtype1.qml"))); qApp->processEvents(); @@ -504,12 +504,12 @@ void tst_qdeclarativeanimations::badTypes() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("badtype4.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGItemPrivate::get(rect)->setState("state1"); + QQuickItemPrivate::get(rect)->setState("state1"); QTest::qWait(1000 + 50); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("MyRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("MyRect"); QVERIFY(myRect); QCOMPARE(myRect->x(),qreal(200)); } @@ -524,13 +524,13 @@ void tst_qdeclarativeanimations::badProperties() QDeclarativeComponent c1(&engine, QUrl::fromLocalFile(TESTDATA("badproperty1.qml"))); QByteArray message = QUrl::fromLocalFile(TESTDATA("badproperty1.qml")).toString().toUtf8() + ":18:9: QML ColorAnimation: Cannot animate non-existent property \"border.colr\""; QTest::ignoreMessage(QtWarningMsg, message); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c1.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c1.create()); QVERIFY(rect); QDeclarativeComponent c2(&engine, QUrl::fromLocalFile(TESTDATA("badproperty2.qml"))); message = QUrl::fromLocalFile(TESTDATA("badproperty2.qml")).toString().toUtf8() + ":18:9: QML ColorAnimation: Cannot animate read-only property \"border\""; QTest::ignoreMessage(QtWarningMsg, message); - rect = qobject_cast<QSGRectangle*>(c2.create()); + rect = qobject_cast<QQuickRectangle*>(c2.create()); QVERIFY(rect); //### should we warn here are well? @@ -546,12 +546,12 @@ void tst_qdeclarativeanimations::mixedTypes() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("mixedtype1.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGItemPrivate::get(rect)->setState("state1"); + QQuickItemPrivate::get(rect)->setState("state1"); QTest::qWait(500); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("MyRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("MyRect"); QVERIFY(myRect); //rather inexact -- is there a better way? @@ -562,12 +562,12 @@ void tst_qdeclarativeanimations::mixedTypes() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("mixedtype2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGItemPrivate::get(rect)->setState("state1"); + QQuickItemPrivate::get(rect)->setState("state1"); QTest::qWait(500); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("MyRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("MyRect"); QVERIFY(myRect); //rather inexact -- is there a better way? @@ -582,10 +582,10 @@ void tst_qdeclarativeanimations::properties() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("properties.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(200)); @@ -594,10 +594,10 @@ void tst_qdeclarativeanimations::properties() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("properties2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(200)); @@ -606,10 +606,10 @@ void tst_qdeclarativeanimations::properties() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("properties3.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(300)); @@ -618,10 +618,10 @@ void tst_qdeclarativeanimations::properties() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("properties4.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->y(),qreal(200)); @@ -631,10 +631,10 @@ void tst_qdeclarativeanimations::properties() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("properties5.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(100)); @@ -648,11 +648,11 @@ void tst_qdeclarativeanimations::propertiesTransition() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("propertiesTransition.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGItemPrivate::get(rect)->setState("moved"); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickItemPrivate::get(rect)->setState("moved"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(200)); @@ -661,12 +661,12 @@ void tst_qdeclarativeanimations::propertiesTransition() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("propertiesTransition2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); QCOMPARE(myRect->x(),qreal(200)); QCOMPARE(myRect->y(),qreal(100)); QTest::qWait(waitDuration); @@ -676,12 +676,12 @@ void tst_qdeclarativeanimations::propertiesTransition() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("propertiesTransition3.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); QCOMPARE(myRect->x(),qreal(200)); QCOMPARE(myRect->y(),qreal(100)); } @@ -689,12 +689,12 @@ void tst_qdeclarativeanimations::propertiesTransition() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("propertiesTransition4.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); QCOMPARE(myRect->x(),qreal(100)); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(200)); @@ -703,12 +703,12 @@ void tst_qdeclarativeanimations::propertiesTransition() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("propertiesTransition5.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); QCOMPARE(myRect->x(),qreal(100)); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(200)); @@ -717,12 +717,12 @@ void tst_qdeclarativeanimations::propertiesTransition() /*{ QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("propertiesTransition6.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); QCOMPARE(myRect->x(),qreal(100)); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(100)); @@ -731,11 +731,11 @@ void tst_qdeclarativeanimations::propertiesTransition() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("propertiesTransition7.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGItemPrivate::get(rect)->setState("moved"); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickItemPrivate::get(rect)->setState("moved"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); QTest::qWait(waitDuration); QTIMED_COMPARE(myRect->x(),qreal(200)); @@ -747,18 +747,18 @@ void tst_qdeclarativeanimations::pathTransition() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("pathTransition.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("redRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("redRect"); QVERIFY(myRect); - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); QTRY_VERIFY(myRect->x() < 500 && myRect->x() > 100 && myRect->y() > 50 && myRect->y() < 700 ); //animation started QTRY_VERIFY(qFuzzyCompare(myRect->x(), qreal(100)) && qFuzzyCompare(myRect->y(), qreal(700))); QTest::qWait(100); - QSGItemPrivate::get(rect)->setState(""); + QQuickItemPrivate::get(rect)->setState(""); QTRY_VERIFY(myRect->x() < 500 && myRect->x() > 100 && myRect->y() > 50 && myRect->y() < 700 ); //animation started QTRY_VERIFY(qFuzzyCompare(myRect->x(), qreal(500)) && qFuzzyCompare(myRect->y(), qreal(50))); } @@ -767,10 +767,10 @@ void tst_qdeclarativeanimations::disabledTransition() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("disabledTransition.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *myRect = rect->findChild<QSGRectangle*>("TheRect"); + QQuickRectangle *myRect = rect->findChild<QQuickRectangle*>("TheRect"); QVERIFY(myRect); QDeclarativeTransition *trans = rect->findChild<QDeclarativeTransition*>(); @@ -778,12 +778,12 @@ void tst_qdeclarativeanimations::disabledTransition() QCOMPARE(trans->enabled(), false); - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); QCOMPARE(myRect->x(),qreal(200)); trans->setEnabled(true); - QSGItemPrivate::get(rect)->setState(""); + QQuickItemPrivate::get(rect)->setState(""); QCOMPARE(myRect->x(),qreal(200)); QTest::qWait(300); QTIMED_COMPARE(myRect->x(),qreal(100)); @@ -809,7 +809,7 @@ void tst_qdeclarativeanimations::attached() QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("attached.qml"))); QTest::ignoreMessage(QtDebugMsg, "off"); QTest::ignoreMessage(QtDebugMsg, "on"); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); } @@ -820,7 +820,7 @@ void tst_qdeclarativeanimations::propertyValueSourceDefaultStart() QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("valuesource.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim"); @@ -833,7 +833,7 @@ void tst_qdeclarativeanimations::propertyValueSourceDefaultStart() QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("valuesource2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim"); @@ -846,7 +846,7 @@ void tst_qdeclarativeanimations::propertyValueSourceDefaultStart() QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("dontAutoStart.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim"); @@ -865,7 +865,7 @@ void tst_qdeclarativeanimations::dontStart() QString warning = c.url().toString() + ":14:13: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes."; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim"); @@ -880,7 +880,7 @@ void tst_qdeclarativeanimations::dontStart() QString warning = c.url().toString() + ":15:17: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes."; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim"); @@ -944,15 +944,15 @@ void tst_qdeclarativeanimations::rotation() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("rotation.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *rr = rect->findChild<QSGRectangle*>("rr"); - QSGRectangle *rr2 = rect->findChild<QSGRectangle*>("rr2"); - QSGRectangle *rr3 = rect->findChild<QSGRectangle*>("rr3"); - QSGRectangle *rr4 = rect->findChild<QSGRectangle*>("rr4"); + QQuickRectangle *rr = rect->findChild<QQuickRectangle*>("rr"); + QQuickRectangle *rr2 = rect->findChild<QQuickRectangle*>("rr2"); + QQuickRectangle *rr3 = rect->findChild<QQuickRectangle*>("rr3"); + QQuickRectangle *rr4 = rect->findChild<QQuickRectangle*>("rr4"); - QSGItemPrivate::get(rect)->setState("state1"); + QQuickItemPrivate::get(rect)->setState("state1"); QTest::qWait(800); qreal r1 = rr->rotation(); qreal r2 = rr2->rotation(); @@ -975,10 +975,10 @@ void tst_qdeclarativeanimations::runningTrueBug() //ensure we start correctly when "running: true" is explicitly set QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("runningTrueBug.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *cloud = rect->findChild<QSGRectangle*>("cloud"); + QQuickRectangle *cloud = rect->findChild<QQuickRectangle*>("cloud"); QVERIFY(cloud); QTest::qWait(1000); QVERIFY(cloud->x() > qreal(0)); @@ -992,10 +992,10 @@ void tst_qdeclarativeanimations::nonTransitionBug() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("nonTransitionBug.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); - QSGRectangle *mover = rect->findChild<QSGRectangle*>("mover"); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); + QQuickRectangle *mover = rect->findChild<QQuickRectangle*>("mover"); mover->setX(100); QCOMPARE(mover->x(), qreal(100)); @@ -1018,7 +1018,7 @@ void tst_qdeclarativeanimations::registrationBug() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("registrationBug.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); QTRY_COMPARE(rect->property("value"), QVariant(int(100))); } @@ -1028,7 +1028,7 @@ void tst_qdeclarativeanimations::doubleRegistrationBug() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("doubleRegistrationBug.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); QDeclarativeAbstractAnimation *anim = rect->findChild<QDeclarativeAbstractAnimation*>("animation"); @@ -1039,7 +1039,7 @@ void tst_qdeclarativeanimations::doubleRegistrationBug() //QTBUG-16736 void tst_qdeclarativeanimations::alwaysRunToEndRestartBug() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativePropertyAnimation animation; animation.setTarget(&rect); animation.setProperty("x"); @@ -1066,7 +1066,7 @@ void tst_qdeclarativeanimations::transitionAssignmentBug() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("transitionAssignmentBug.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); QCOMPARE(rect->property("nullObject").toBool(), false); @@ -1078,7 +1078,7 @@ void tst_qdeclarativeanimations::pauseBindingBug() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("pauseBindingBug.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); QDeclarativeAbstractAnimation *anim = rect->findChild<QDeclarativeAbstractAnimation*>("animation"); QVERIFY(anim->qtAnimation()->state() == QAbstractAnimation::Paused); diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp index b3fa38de38..db345e38fd 100644 --- a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp +++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp @@ -42,8 +42,8 @@ #include <qtest.h> #include <QtDeclarative/qdeclarativecomponent.h> #include <QtDeclarative/qdeclarativeengine.h> -#include <QtDeclarative/qsgitem.h> -#include <QtDeclarative/qsgview.h> +#include <QtDeclarative/qquickitem.h> +#include <QtDeclarative/qquickview.h> #include <QtGui/qinputpanel.h> class tst_qdeclarativeapplication : public QObject @@ -71,9 +71,9 @@ void tst_qdeclarativeapplication::active() QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Item { property bool active: Qt.application.active }", QUrl::fromLocalFile("")); - QSGItem *item = qobject_cast<QSGItem *>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem *>(component.create()); QVERIFY(item); - QSGView view; + QQuickView view; item->setParentItem(view.rootObject()); // not active @@ -84,7 +84,7 @@ void tst_qdeclarativeapplication::active() view.show(); view.requestActivateWindow(); QTest::qWait(50); - QTRY_COMPARE(view.status(), QSGView::Ready); + QTRY_COMPARE(view.status(), QQuickView::Ready); QCOMPARE(item->property("active").toBool(), QGuiApplication::activeWindow() != 0); // not active again @@ -104,9 +104,9 @@ void tst_qdeclarativeapplication::layoutDirection() QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Item { property bool layoutDirection: Qt.application.layoutDirection }", QUrl::fromLocalFile("")); - QSGItem *item = qobject_cast<QSGItem *>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem *>(component.create()); QVERIFY(item); - QSGView view; + QQuickView view; item->setParentItem(view.rootObject()); // not mirrored @@ -125,9 +125,9 @@ void tst_qdeclarativeapplication::inputPanel() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Item { property variant inputPanel: Qt.application.inputPanel }", QUrl::fromLocalFile("")); - QSGItem *item = qobject_cast<QSGItem *>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem *>(component.create()); QVERIFY(item); - QSGView view; + QQuickView view; item->setParentItem(view.rootObject()); // check that the inputPanel property maches with application's input panel diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp index b2aa311434..b6e68d6677 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp +++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp @@ -42,12 +42,12 @@ #include <qsignalspy.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgview.h> -#include <private/qsgrectangle_p.h> -#include <private/qsgtext_p.h> +#include <QtDeclarative/qquickview.h> +#include <private/qquickrectangle_p.h> +#include <private/qquicktext_p.h> #include <private/qdeclarativebehavior_p.h> #include <private/qdeclarativeanimation_p.h> -#include <private/qsgitem_p.h> +#include <private/qquickitem_p.h> #include "../shared/util.h" class tst_qdeclarativebehaviors : public QObject @@ -83,13 +83,13 @@ void tst_qdeclarativebehaviors::simpleBehavior() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("simple.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QTRY_VERIFY(rect); QTRY_VERIFY(qobject_cast<QDeclarativeBehavior*>(rect->findChild<QDeclarativeBehavior*>("MyBehavior"))->animation()); - QSGItemPrivate::get(rect)->setState("moved"); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x() > 0); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x() < 200); + QQuickItemPrivate::get(rect)->setState("moved"); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x() > 0); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x() < 200); //i.e. the behavior has been triggered delete rect; @@ -99,12 +99,12 @@ void tst_qdeclarativebehaviors::scriptTriggered() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("scripttrigger.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QTRY_VERIFY(rect); rect->setColor(QColor("red")); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x() > 0); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x() < 200); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x() > 0); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x() < 200); //i.e. the behavior has been triggered delete rect; @@ -114,10 +114,10 @@ void tst_qdeclarativebehaviors::cppTriggered() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("cpptrigger.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QTRY_VERIFY(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QTRY_VERIFY(innerRect); innerRect->setProperty("x", 200); @@ -132,11 +132,11 @@ void tst_qdeclarativebehaviors::loop() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("loop.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QTRY_VERIFY(rect); //don't crash - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); delete rect; } @@ -145,12 +145,12 @@ void tst_qdeclarativebehaviors::colorBehavior() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("color.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QTRY_VERIFY(rect); - QSGItemPrivate::get(rect)->setState("red"); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->color() != QColor("red")); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->color() != QColor("green")); + QQuickItemPrivate::get(rect)->setState("red"); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->color() != QColor("red")); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->color() != QColor("green")); //i.e. the behavior has been triggered delete rect; @@ -160,12 +160,12 @@ void tst_qdeclarativebehaviors::parentBehavior() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("parent.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QTRY_VERIFY(rect); - QSGItemPrivate::get(rect)->setState("reparented"); - QTRY_VERIFY(rect->findChild<QSGRectangle*>("MyRect")->parentItem() != rect->findChild<QSGItem*>("NewParent")); - QTRY_VERIFY(rect->findChild<QSGRectangle*>("MyRect")->parentItem() == rect->findChild<QSGItem*>("NewParent")); + QQuickItemPrivate::get(rect)->setState("reparented"); + QTRY_VERIFY(rect->findChild<QQuickRectangle*>("MyRect")->parentItem() != rect->findChild<QQuickItem*>("NewParent")); + QTRY_VERIFY(rect->findChild<QQuickRectangle*>("MyRect")->parentItem() == rect->findChild<QQuickItem*>("NewParent")); delete rect; } @@ -174,11 +174,11 @@ void tst_qdeclarativebehaviors::replaceBinding() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("binding.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QTRY_VERIFY(rect); - QSGItemPrivate::get(rect)->setState("moved"); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickItemPrivate::get(rect)->setState("moved"); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QTRY_VERIFY(innerRect); QTRY_VERIFY(innerRect->x() > 0); QTRY_VERIFY(innerRect->x() < 200); @@ -189,7 +189,7 @@ void tst_qdeclarativebehaviors::replaceBinding() rect->setProperty("movedx", 210); QTRY_COMPARE(innerRect->x(), (qreal)210); - QSGItemPrivate::get(rect)->setState(""); + QQuickItemPrivate::get(rect)->setState(""); QTRY_VERIFY(innerRect->x() > 10); QTRY_VERIFY(innerRect->x() < 210); //i.e. the behavior has been triggered QTRY_COMPARE(innerRect->x(), (qreal)10); @@ -207,14 +207,14 @@ void tst_qdeclarativebehaviors::group() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("groupProperty.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); qDebug() << c.errorString(); QTRY_VERIFY(rect); - QSGItemPrivate::get(rect)->setState("moved"); + QQuickItemPrivate::get(rect)->setState("moved"); //QTest::qWait(200); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x() > 0); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x() < 200); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x() > 0); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x() < 200); //i.e. the behavior has been triggered delete rect; @@ -224,12 +224,12 @@ void tst_qdeclarativebehaviors::group() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("groupProperty2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QTRY_VERIFY(rect); - QSGItemPrivate::get(rect)->setState("moved"); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->border()->width() > 0); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->border()->width() < 4); + QQuickItemPrivate::get(rect)->setState("moved"); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->border()->width() > 0); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->border()->width() < 4); //i.e. the behavior has been triggered delete rect; @@ -240,11 +240,11 @@ void tst_qdeclarativebehaviors::emptyBehavior() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("empty.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGItemPrivate::get(rect)->setState("moved"); - qreal x = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x(); + QQuickItemPrivate::get(rect)->setState("moved"); + qreal x = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x(); QCOMPARE(x, qreal(200)); //should change immediately delete rect; @@ -254,12 +254,12 @@ void tst_qdeclarativebehaviors::explicitSelection() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("explicit.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGItemPrivate::get(rect)->setState("moved"); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x() > 0); - QTRY_VERIFY(qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x() < 200); + QQuickItemPrivate::get(rect)->setState("moved"); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x() > 0); + QTRY_VERIFY(qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x() < 200); //i.e. the behavior has been triggered delete rect; @@ -269,11 +269,11 @@ void tst_qdeclarativebehaviors::nonSelectingBehavior() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("nonSelecting2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGItemPrivate::get(rect)->setState("moved"); - qreal x = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x(); + QQuickItemPrivate::get(rect)->setState("moved"); + qreal x = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x(); QCOMPARE(x, qreal(200)); //should change immediately delete rect; @@ -285,7 +285,7 @@ void tst_qdeclarativebehaviors::reassignedAnimation() QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("reassignedAnimation.qml"))); QString warning = QUrl::fromLocalFile(TESTDATA("reassignedAnimation.qml")).toString() + ":9:9: QML Behavior: Cannot change the animation assigned to a Behavior."; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QCOMPARE(qobject_cast<QDeclarativeNumberAnimation*>( rect->findChild<QDeclarativeBehavior*>("MyBehavior")->animation())->duration(), 200); @@ -297,12 +297,12 @@ void tst_qdeclarativebehaviors::disabled() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("disabled.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QCOMPARE(rect->findChild<QDeclarativeBehavior*>("MyBehavior")->enabled(), false); - QSGItemPrivate::get(rect)->setState("moved"); - qreal x = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"))->x(); + QQuickItemPrivate::get(rect)->setState("moved"); + qreal x = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect"))->x(); QCOMPARE(x, qreal(200)); //should change immediately delete rect; @@ -316,7 +316,7 @@ void tst_qdeclarativebehaviors::dontStart() QString warning = c.url().toString() + ":13:13: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes."; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim"); @@ -331,10 +331,10 @@ void tst_qdeclarativebehaviors::startup() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("startup.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *innerRect = rect->findChild<QSGRectangle*>("innerRect"); + QQuickRectangle *innerRect = rect->findChild<QQuickRectangle*>("innerRect"); QVERIFY(innerRect); QCOMPARE(innerRect->x(), qreal(100)); //should be set immediately @@ -345,13 +345,13 @@ void tst_qdeclarativebehaviors::startup() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("startup2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *innerRect = rect->findChild<QSGRectangle*>("innerRect"); + QQuickRectangle *innerRect = rect->findChild<QQuickRectangle*>("innerRect"); QVERIFY(innerRect); - QSGText *text = rect->findChild<QSGText*>(); + QQuickText *text = rect->findChild<QQuickText*>(); QVERIFY(text); QCOMPARE(innerRect->x(), text->width()); //should be set immediately @@ -365,7 +365,7 @@ void tst_qdeclarativebehaviors::groupedPropertyCrash() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("groupedPropertyCrash.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); //don't crash } @@ -374,7 +374,7 @@ void tst_qdeclarativebehaviors::runningTrue() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("runningTrue.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); QDeclarativeAbstractAnimation *animation = rect->findChild<QDeclarativeAbstractAnimation*>("rotAnim"); @@ -390,10 +390,10 @@ void tst_qdeclarativebehaviors::sameValue() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("qtbug12295.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *target = rect->findChild<QSGRectangle*>("myRect"); + QQuickRectangle *target = rect->findChild<QQuickRectangle*>("myRect"); QVERIFY(target); target->setX(100); @@ -421,10 +421,10 @@ void tst_qdeclarativebehaviors::delayedRegistration() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("delayedRegistration.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItem *innerRect = rect->property("myItem").value<QSGItem*>(); + QQuickItem *innerRect = rect->property("myItem").value<QQuickItem*>(); QVERIFY(innerRect != 0); QCOMPARE(innerRect->property("x").toInt(), int(0)); diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp index de34d9e009..ea05963827 100644 --- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp +++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp @@ -42,7 +42,7 @@ #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> #include <private/qdeclarativebind_p.h> -#include <private/qsgrectangle_p.h> +#include <private/qquickrectangle_p.h> #include "../shared/util.h" class tst_qdeclarativebinding : public QObject @@ -70,7 +70,7 @@ void tst_qdeclarativebinding::binding() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-binding.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); QDeclarativeBind *binding3 = qobject_cast<QDeclarativeBind*>(rect->findChild<QDeclarativeBind*>("binding3")); @@ -98,7 +98,7 @@ void tst_qdeclarativebinding::whenAfterValue() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-binding2.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); QCOMPARE(rect->color(), QColor("yellow")); @@ -114,10 +114,10 @@ void tst_qdeclarativebinding::restoreBinding() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("restoreBinding.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGRectangle *myItem = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("myItem")); + QQuickRectangle *myItem = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("myItem")); QVERIFY(myItem != 0); myItem->setY(25); @@ -144,10 +144,10 @@ void tst_qdeclarativebinding::restoreBindingWithLoop() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("restoreBindingWithLoop.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGRectangle *myItem = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("myItem")); + QQuickRectangle *myItem = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("myItem")); QVERIFY(myItem != 0); myItem->setY(25); @@ -179,7 +179,7 @@ void tst_qdeclarativebinding::deletedObject() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("deletedObject.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); QGuiApplication::sendPostedEvents(0, QEvent::DeferredDelete); diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp index f3354ac5db..1dcaaa1b06 100644 --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp @@ -43,7 +43,7 @@ #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgitem.h> +#include <QtDeclarative/qquickitem.h> #include <QtDeclarative/qdeclarativeproperty.h> #include <QtDeclarative/qdeclarativeincubator.h> #include <qcolor.h> @@ -133,7 +133,7 @@ void tst_qdeclarativecomponent::qmlCreateObject() QObject *testObject2 = object->property("declarativeitem").value<QObject*>(); QVERIFY(testObject2); QVERIFY(testObject2->parent() == object); - QCOMPARE(testObject2->metaObject()->className(), "QSGItem"); + QCOMPARE(testObject2->metaObject()->className(), "QQuickItem"); } void tst_qdeclarativecomponent::qmlCreateObjectWithProperties() diff --git a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp index ec04833548..450f16c036 100644 --- a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp +++ b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp @@ -42,7 +42,7 @@ #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> #include <private/qdeclarativeconnections_p.h> -#include <private/qsgitem_p.h> +#include <private/qquickitem_p.h> #include "../shared/util.h" #include <QtDeclarative/qdeclarativescriptstring.h> @@ -102,7 +102,7 @@ void tst_qdeclarativeconnection::connection() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-connection.qml"))); - QSGItem *item = qobject_cast<QSGItem*>(c.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(c.create()); QVERIFY(item != 0); @@ -119,7 +119,7 @@ void tst_qdeclarativeconnection::trimming() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("trimming.qml"))); - QSGItem *item = qobject_cast<QSGItem*>(c.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(c.create()); QVERIFY(item != 0); @@ -140,18 +140,18 @@ void tst_qdeclarativeconnection::targetChanged() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("connection-targetchange.qml"))); - QSGItem *item = qobject_cast<QSGItem*>(c.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(c.create()); QVERIFY(item != 0); QDeclarativeConnections *connections = item->findChild<QDeclarativeConnections*>("connections"); QVERIFY(connections); - QSGItem *item1 = item->findChild<QSGItem*>("item1"); + QQuickItem *item1 = item->findChild<QQuickItem*>("item1"); QVERIFY(item1); item1->setWidth(200); - QSGItem *item2 = item->findChild<QSGItem*>("item2"); + QQuickItem *item2 = item->findChild<QQuickItem*>("item2"); QVERIFY(item2); QVERIFY(connections->target() == item2); @@ -185,7 +185,7 @@ void tst_qdeclarativeconnection::unknownSignals() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, url); - QSGItem *item = qobject_cast<QSGItem*>(c.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(c.create()); QVERIFY(item != 0); // check that connection is created (they are all runtime errors) diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp index 9f4e131cbd..e438885dbf 100644 --- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp +++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp @@ -42,7 +42,7 @@ #include <QtTest/QtTest> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativeimageprovider.h> -#include <private/qsgimage_p.h> +#include <private/qquickimage_p.h> #include <QImageReader> #include <QWaitCondition> @@ -228,19 +228,19 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide + properties + " }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); if (async) - QTRY_VERIFY(obj->status() == QSGImage::Loading); + QTRY_VERIFY(obj->status() == QQuickImage::Loading); QCOMPARE(obj->source(), QUrl(source)); if (error.isEmpty()) { if (async) - QTRY_VERIFY(obj->status() == QSGImage::Ready); + QTRY_VERIFY(obj->status() == QQuickImage::Ready); else - QVERIFY(obj->status() == QSGImage::Ready); + QVERIFY(obj->status() == QQuickImage::Ready); if (QByteArray(QTest::currentDataTag()).startsWith("qimage")) QCOMPARE(static_cast<TestQImageProvider*>(provider)->lastImageId, imageId); else @@ -248,13 +248,13 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide QCOMPARE(obj->width(), qreal(size.width())); QCOMPARE(obj->height(), qreal(size.height())); - QCOMPARE(obj->fillMode(), QSGImage::Stretch); + QCOMPARE(obj->fillMode(), QQuickImage::Stretch); QCOMPARE(obj->progress(), 1.0); } else { if (async) - QTRY_VERIFY(obj->status() == QSGImage::Error); + QTRY_VERIFY(obj->status() == QQuickImage::Error); else - QVERIFY(obj->status() == QSGImage::Error); + QVERIFY(obj->status() == QQuickImage::Error); } delete obj; @@ -308,7 +308,7 @@ void tst_qdeclarativeimageprovider::requestPixmap_async() QString componentStr = "import QtQuick 2.0\nImage { asynchronous: true; source: \"image://test/pixmap-async-test.png\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); delete obj; @@ -335,10 +335,10 @@ void tst_qdeclarativeimageprovider::removeProvider() QString componentStr = "import QtQuick 2.0\nImage { source: \"" + newImageFileName() + "\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); - QCOMPARE(obj->status(), QSGImage::Ready); + QCOMPARE(obj->status(), QQuickImage::Ready); // remove the provider and confirm QString fileName = newImageFileName(); @@ -348,7 +348,7 @@ void tst_qdeclarativeimageprovider::removeProvider() engine.removeImageProvider("test"); obj->setSource(QUrl(fileName)); - QCOMPARE(obj->status(), QSGImage::Error); + QCOMPARE(obj->status(), QQuickImage::Error); delete obj; } @@ -404,17 +404,17 @@ void tst_qdeclarativeimageprovider::threadTest() QObject *obj = component.create(); //MUST not deadlock QVERIFY(obj != 0); - QList<QSGImage *> images = obj->findChildren<QSGImage *>(); + QList<QQuickImage *> images = obj->findChildren<QQuickImage *>(); QCOMPARE(images.count(), 4); QTest::qWait(100); - foreach (QSGImage *img, images) { - QCOMPARE(img->status(), QSGImage::Loading); + foreach (QQuickImage *img, images) { + QCOMPARE(img->status(), QQuickImage::Loading); } provider->ok = true; provider->cond.wakeAll(); QTest::qWait(250); - foreach (QSGImage *img, images) { - QTRY_VERIFY(img->status() == QSGImage::Ready); + foreach (QQuickImage *img, images) { + QTRY_VERIFY(img->status() == QQuickImage::Ready); } } diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index bde2c14fd9..538ebbb1a3 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -1644,17 +1644,17 @@ void tst_qdeclarativelanguage::importsLocal_data() QTest::newRow("local import") << "import \"subdir\"\n" // QT-613 "Test {}" - << "QSGRectangle" + << "QQuickRectangle" << ""; QTest::newRow("local import second") << "import QtQuick 2.0\nimport \"subdir\"\n" "Test {}" - << "QSGRectangle" + << "QQuickRectangle" << ""; QTest::newRow("local import subsubdir") << "import QtQuick 2.0\nimport \"subdir/subsubdir\"\n" "SubTest {}" - << "QSGRectangle" + << "QQuickRectangle" << ""; QTest::newRow("local import QTBUG-7721 A") << "subdir.Test {}" // no longer allowed (QTBUG-7721) @@ -1668,7 +1668,7 @@ void tst_qdeclarativelanguage::importsLocal_data() QTest::newRow("local import as") << "import \"subdir\" as T\n" "T.Test {}" - << "QSGRectangle" + << "QQuickRectangle" << ""; QTest::newRow("wrong local import as") << "import \"subdir\" as T\n" @@ -1734,11 +1734,11 @@ void tst_qdeclarativelanguage::importsRemote_data() QString serverdir = "http://127.0.0.1:14447/qtest/declarative/qmllanguage"; - QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QSGRectangle" + QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QQuickRectangle" << ""; - QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QSGText" + QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QQuickText" << ""; - QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QSGImage" + QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QQuickImage" << ""; QTest::newRow("wrong remote import with undeclared local") << "import \""+serverdir+"\"\nWrongTestLocal {}" << "" << "WrongTestLocal is not a type"; @@ -1772,27 +1772,27 @@ void tst_qdeclarativelanguage::importsInstalled_data() QTest::newRow("installed import 0") << "import com.nokia.installedtest0 0.0\n" "InstalledTestTP {}" - << "QSGRectangle" + << "QQuickRectangle" << ""; QTest::newRow("installed import 0 as TP") << "import com.nokia.installedtest0 0.0 as TP\n" "TP.InstalledTestTP {}" - << "QSGRectangle" + << "QQuickRectangle" << ""; QTest::newRow("installed import 1") << "import com.nokia.installedtest 1.0\n" "InstalledTest {}" - << "QSGRectangle" + << "QQuickRectangle" << ""; QTest::newRow("installed import 2") << "import com.nokia.installedtest 1.3\n" "InstalledTest {}" - << "QSGRectangle" + << "QQuickRectangle" << ""; QTest::newRow("installed import 3") << "import com.nokia.installedtest 1.4\n" "InstalledTest {}" - << "QSGText" + << "QQuickText" << ""; QTest::newRow("installed import minor version not available") // QTBUG-11936 << "import com.nokia.installedtest 0.1\n" @@ -1835,26 +1835,26 @@ void tst_qdeclarativelanguage::importsOrder_data() "import com.nokia.installedtest 1.4\n" "import com.nokia.installedtest 1.4\n" "InstalledTest {}" - << (!qmlCheckTypes()?"QSGText":"") + << (!qmlCheckTypes()?"QQuickText":"") << (!qmlCheckTypes()?"":"InstalledTest is ambiguous. Found in lib/com/nokia/installedtest in version 1.4 and 1.4"); QTest::newRow("installed import overrides 1") << "import com.nokia.installedtest 1.0\n" "import com.nokia.installedtest 1.4\n" "InstalledTest {}" - << (!qmlCheckTypes()?"QSGText":"") + << (!qmlCheckTypes()?"QQuickText":"") << (!qmlCheckTypes()?"":"InstalledTest is ambiguous. Found in lib/com/nokia/installedtest in version 1.4 and 1.0"); QTest::newRow("installed import overrides 2") << "import com.nokia.installedtest 1.4\n" "import com.nokia.installedtest 1.0\n" "InstalledTest {}" - << (!qmlCheckTypes()?"QSGRectangle":"") + << (!qmlCheckTypes()?"QQuickRectangle":"") << (!qmlCheckTypes()?"":"InstalledTest is ambiguous. Found in lib/com/nokia/installedtest in version 1.0 and 1.4"); QTest::newRow("installed import re-overrides 1") << "import com.nokia.installedtest 1.4\n" "import com.nokia.installedtest 1.0\n" "import com.nokia.installedtest 1.4\n" "InstalledTest {}" - << (!qmlCheckTypes()?"QSGText":"") + << (!qmlCheckTypes()?"QQuickText":"") << (!qmlCheckTypes()?"":"InstalledTest is ambiguous. Found in lib/com/nokia/installedtest in version 1.4 and 1.0"); QTest::newRow("installed import re-overrides 2") << "import com.nokia.installedtest 1.4\n" @@ -1862,20 +1862,20 @@ void tst_qdeclarativelanguage::importsOrder_data() "import com.nokia.installedtest 1.4\n" "import com.nokia.installedtest 1.0\n" "InstalledTest {}" - << (!qmlCheckTypes()?"QSGRectangle":"") + << (!qmlCheckTypes()?"QQuickRectangle":"") << (!qmlCheckTypes()?"":"InstalledTest is ambiguous. Found in lib/com/nokia/installedtest in version 1.0 and 1.4"); QTest::newRow("installed import versus builtin 1") << "import com.nokia.installedtest 1.5\n" "import QtQuick 2.0\n" "Rectangle {}" - << (!qmlCheckTypes()?"QSGRectangle":"") + << (!qmlCheckTypes()?"QQuickRectangle":"") << (!qmlCheckTypes()?"":"Rectangle is ambiguous. Found in Qt and in lib/com/nokia/installedtest"); QTest::newRow("installed import versus builtin 2") << "import QtQuick 2.0\n" "import com.nokia.installedtest 1.5\n" "Rectangle {}" - << (!qmlCheckTypes()?"QSGText":"") + << (!qmlCheckTypes()?"QQuickText":"") << (!qmlCheckTypes()?"":"Rectangle is ambiguous. Found in lib/com/nokia/installedtest and in Qt"); QTest::newRow("namespaces cannot be overridden by types 1") << "import QtQuick 2.0 as Rectangle\n" @@ -1887,16 +1887,16 @@ void tst_qdeclarativelanguage::importsOrder_data() "import QtQuick 2.0 as Rectangle\n" "import com.nokia.installedtest 1.5\n" "Rectangle.Image {}" - << "QSGImage" + << "QQuickImage" << ""; QTest::newRow("local last 1") << "LocalLast {}" - << "QSGText" + << "QQuickText" << ""; QTest::newRow("local last 2") << "import com.nokia.installedtest 1.0\n" "LocalLast {}" - << (!qmlCheckTypes()?"QSGRectangle":"")// i.e. from com.nokia.installedtest, not data/LocalLast.qml + << (!qmlCheckTypes()?"QQuickRectangle":"")// i.e. from com.nokia.installedtest, not data/LocalLast.qml << (!qmlCheckTypes()?"":"LocalLast is ambiguous. Found in lib/com/nokia/installedtest and in local directory"); } diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index 92e3a8f58d..bc6c99102e 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ #include <qtest.h> -#include <QtDeclarative/private/qsgitem_p.h> -#include <QtDeclarative/private/qsgtext_p.h> +#include <QtDeclarative/private/qquickitem_p.h> +#include <QtDeclarative/private/qquicktext_p.h> #include <QtDeclarative/private/qdeclarativeengine_p.h> #include <QtDeclarative/private/qdeclarativelistmodel_p.h> #include <QtDeclarative/private/qdeclarativeexpression_p.h> @@ -62,8 +62,8 @@ public: private: int roleFromName(const QDeclarativeListModel *model, const QString &roleName); - QSGItem *createWorkerTest(QDeclarativeEngine *eng, QDeclarativeComponent *component, QDeclarativeListModel *model); - void waitForWorker(QSGItem *item); + QQuickItem *createWorkerTest(QDeclarativeEngine *eng, QDeclarativeComponent *component, QDeclarativeListModel *model); + void waitForWorker(QQuickItem *item); private slots: void static_types(); @@ -113,16 +113,16 @@ int tst_qdeclarativelistmodel::roleFromName(const QDeclarativeListModel *model, return -1; } -QSGItem *tst_qdeclarativelistmodel::createWorkerTest(QDeclarativeEngine *eng, QDeclarativeComponent *component, QDeclarativeListModel *model) +QQuickItem *tst_qdeclarativelistmodel::createWorkerTest(QDeclarativeEngine *eng, QDeclarativeComponent *component, QDeclarativeListModel *model) { - QSGItem *item = qobject_cast<QSGItem*>(component->create()); + QQuickItem *item = qobject_cast<QQuickItem*>(component->create()); QDeclarativeEngine::setContextForObject(model, eng->rootContext()); if (item) item->setProperty("model", qVariantFromValue(model)); return item; } -void tst_qdeclarativelistmodel::waitForWorker(QSGItem *item) +void tst_qdeclarativelistmodel::waitForWorker(QQuickItem *item) { QEventLoop loop; QTimer timer; @@ -164,7 +164,7 @@ void tst_qdeclarativelistmodel::static_types_data() QTest::newRow("enum") << "ListElement { foo: Text.AlignHCenter }" - << QVariant(double(QSGText::AlignHCenter)); + << QVariant(double(QQuickText::AlignHCenter)); QTest::newRow("Qt enum") << "ListElement { foo: Qt.AlignBottom }" @@ -456,7 +456,7 @@ void tst_qdeclarativelistmodel::dynamic_worker() QDeclarativeListModel model; QDeclarativeEngine eng; QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); - QSGItem *item = createWorkerTest(&eng, &component, &model); + QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); QSignalSpy spyCount(&model, SIGNAL(countChanged())); @@ -502,7 +502,7 @@ void tst_qdeclarativelistmodel::dynamic_worker_sync() QDeclarativeListModel model; QDeclarativeEngine eng; QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); - QSGItem *item = createWorkerTest(&eng, &component, &model); + QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); if (script[0] == QLatin1Char('{') && script[script.length()-1] == QLatin1Char('}')) @@ -556,7 +556,7 @@ void tst_qdeclarativelistmodel::convertNestedToFlat_fail() QDeclarativeListModel model; QDeclarativeEngine eng; QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); - QSGItem *item = createWorkerTest(&eng, &component, &model); + QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); RUNEVAL(item, "model.append({foo: 123})"); @@ -599,7 +599,7 @@ void tst_qdeclarativelistmodel::convertNestedToFlat_ok() QDeclarativeListModel model; QDeclarativeEngine eng; QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); - QSGItem *item = createWorkerTest(&eng, &component, &model); + QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); RUNEVAL(item, "model.append({foo: 123})"); @@ -643,7 +643,7 @@ void tst_qdeclarativelistmodel::enumerate() QDeclarativeEngine eng; QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/enumerate.qml")); QVERIFY(!component.isError()); - QSGItem *item = qobject_cast<QSGItem*>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item != 0); QStringList r = item->property("result").toString().split(":"); QCOMPARE(r[0],QLatin1String("val1=1Y")); @@ -830,7 +830,7 @@ void tst_qdeclarativelistmodel::get_worker() QDeclarativeListModel model; QDeclarativeEngine eng; QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); - QSGItem *item = createWorkerTest(&eng, &component, &model); + QQuickItem *item = createWorkerTest(&eng, &component, &model); QVERIFY(item != 0); // Add some values like get() test @@ -1131,7 +1131,7 @@ void tst_qdeclarativelistmodel::property_changes_worker() QDeclarativeEngine engine; QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); QVERIFY2(component.errorString().isEmpty(), component.errorString().toUtf8()); - QSGItem *item = createWorkerTest(&engine, &component, &model); + QQuickItem *item = createWorkerTest(&engine, &component, &model); QVERIFY(item != 0); QDeclarativeExpression expr(engine.rootContext(), &model, script_setup); diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp index 966ac1950c..510bc595be 100644 --- a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp +++ b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp @@ -43,7 +43,7 @@ #include <QtDeclarative/qdeclarativecontext.h> #include <QtDeclarative/qdeclarativepropertymap.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <private/qsgtext_p.h> +#include <private/qquicktext_p.h> #include <QSignalSpy> class tst_QDeclarativePropertyMap : public QObject @@ -176,7 +176,7 @@ void tst_QDeclarativePropertyMap::changed() component.setData("import QtQuick 2.0\nText { text: { testdata.key1 = 'Hello World'; 'X' } }", QUrl::fromLocalFile("")); QVERIFY(component.isReady()); - QSGText *txt = qobject_cast<QSGText*>(component.create()); + QQuickText *txt = qobject_cast<QQuickText*>(component.create()); QVERIFY(txt); QCOMPARE(txt->text(), QString('X')); QCOMPARE(spy.count(), 1); diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp index dbf5373599..b4ac2dfc66 100644 --- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp +++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp @@ -50,7 +50,7 @@ #include <QDir> #include <QVector3D> #include <QCryptographicHash> -#include <QSGItem> +#include <QQuickItem> #include <QSignalSpy> #include "../shared/util.h" @@ -451,7 +451,7 @@ void tst_qdeclarativeqt::createQmlObject() QCOMPARE(object->property("emptyArg").toBool(), true); QCOMPARE(object->property("success").toBool(), true); - QSGItem *item = qobject_cast<QSGItem *>(object); + QQuickItem *item = qobject_cast<QQuickItem *>(object); QVERIFY(item != 0); QVERIFY(item->childItems().count() == 1); diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp b/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp index 989edfab8b..735af520fe 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp @@ -42,7 +42,7 @@ #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> #include <private/qdeclarativesmoothedanimation_p.h> -#include <private/qsgrectangle_p.h> +#include <private/qquickrectangle_p.h> #include <private/qdeclarativevaluetype_p.h> #include "../shared/util.h" @@ -120,7 +120,7 @@ void tst_qdeclarativesmoothedanimation::disabled() void tst_qdeclarativesmoothedanimation::simpleAnimation() { - QSGRectangle rect; + QQuickRectangle rect; QDeclarativeSmoothedAnimation animation; animation.setTarget(&rect); animation.setProperty("x"); @@ -150,10 +150,10 @@ void tst_qdeclarativesmoothedanimation::valueSource() QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("smoothedanimationValueSource.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *theRect = rect->findChild<QSGRectangle*>("theRect"); + QQuickRectangle *theRect = rect->findChild<QQuickRectangle*>("theRect"); QVERIFY(theRect); QDeclarativeSmoothedAnimation *easeX = rect->findChild<QDeclarativeSmoothedAnimation*>("easeX"); @@ -182,10 +182,10 @@ void tst_qdeclarativesmoothedanimation::behavior() QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("smoothedanimationBehavior.qml"))); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect); - QSGRectangle *theRect = rect->findChild<QSGRectangle*>("theRect"); + QQuickRectangle *theRect = rect->findChild<QQuickRectangle*>("theRect"); QVERIFY(theRect); QDeclarativeSmoothedAnimation *easeX = rect->findChild<QDeclarativeSmoothedAnimation*>("easeX"); diff --git a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp index b7e04b7e70..f7c520d283 100644 --- a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp +++ b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp @@ -41,7 +41,7 @@ #include <qtest.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <private/qsgtext_p.h> +#include <private/qquicktext_p.h> #include <private/qdeclarativeengine_p.h> #include <QtCore/qcryptographichash.h> /* @@ -206,7 +206,7 @@ void tst_qdeclarativesqldatabase::testQml() QDeclarativeComponent component(engine); component.setData(qml.toUtf8(), QUrl::fromLocalFile(TESTDATA("empty.qml"))); // just a file for relative local imports QVERIFY(!component.isError()); - QSGText *text = qobject_cast<QSGText*>(component.create()); + QQuickText *text = qobject_cast<QQuickText*>(component.create()); QVERIFY(text != 0); QCOMPARE(text->text(),QString("passed")); } diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index ac24a0b6c5..f6ab6526aa 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -41,14 +41,14 @@ #include <qtest.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgview.h> -#include <private/qsgstateoperations_p.h> -#include <private/qsganchors_p_p.h> -#include <private/qsgrectangle_p.h> -#include <private/qsgimage_p.h> +#include <QtDeclarative/qquickview.h> +#include <private/qquickstateoperations_p.h> +#include <private/qquickanchors_p_p.h> +#include <private/qquickrectangle_p.h> +#include <private/qquickimage_p.h> #include <private/qdeclarativepropertychanges_p.h> #include <private/qdeclarativestategroup_p.h> -#include <private/qsgitem_p.h> +#include <private/qquickitem_p.h> #include <private/qdeclarativeproperty_p.h> #include "../shared/util.h" @@ -66,7 +66,7 @@ private: int m_foo; }; -class MyRect : public QSGRectangle +class MyRect : public QQuickRectangle { Q_OBJECT Q_PROPERTY(int propertyWithNotify READ propertyWithNotify WRITE setPropertyWithNotify NOTIFY oddlyNamedNotifySignal) @@ -163,8 +163,8 @@ void tst_qdeclarativestates::basicChanges() { QDeclarativeComponent rectComponent(&engine, TESTDATA("basicChanges.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -178,8 +178,8 @@ void tst_qdeclarativestates::basicChanges() { QDeclarativeComponent rectComponent(&engine, TESTDATA("basicChanges2.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -199,8 +199,8 @@ void tst_qdeclarativestates::basicChanges() { QDeclarativeComponent rectComponent(&engine, TESTDATA("basicChanges3.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -259,7 +259,7 @@ void tst_qdeclarativestates::attachedPropertyChanges() QDeclarativeComponent component(&engine, TESTDATA("attachedPropertyChanges.qml")); QVERIFY(component.isReady()); - QSGItem *item = qobject_cast<QSGItem*>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item != 0); QCOMPARE(item->width(), 50.0); @@ -279,8 +279,8 @@ void tst_qdeclarativestates::basicExtension() { QDeclarativeComponent rectComponent(&engine, TESTDATA("basicExtension.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -313,8 +313,8 @@ void tst_qdeclarativestates::basicExtension() { QDeclarativeComponent rectComponent(&engine, TESTDATA("fakeExtension.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -345,8 +345,8 @@ void tst_qdeclarativestates::basicBinding() { QDeclarativeComponent rectComponent(&engine, TESTDATA("basicBinding.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -373,8 +373,8 @@ void tst_qdeclarativestates::basicBinding() { QDeclarativeComponent rectComponent(&engine, TESTDATA("basicBinding2.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -404,8 +404,8 @@ void tst_qdeclarativestates::basicBinding() { QDeclarativeComponent rectComponent(&engine, TESTDATA("basicBinding3.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -429,8 +429,8 @@ void tst_qdeclarativestates::basicBinding() { QDeclarativeComponent rectComponent(&engine, TESTDATA("basicBinding4.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); @@ -469,7 +469,7 @@ void tst_qdeclarativestates::signalOverride() rect->doSomething(); QCOMPARE(rect->color(),QColor("blue")); - QSGItemPrivate::get(rect)->setState("green"); + QQuickItemPrivate::get(rect)->setState("green"); rect->doSomething(); QCOMPARE(rect->color(),QColor("green")); } @@ -483,8 +483,8 @@ void tst_qdeclarativestates::signalOverride() rect->doSomething(); QCOMPARE(rect->color(),QColor("blue")); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("extendedRect")); - QSGItemPrivate::get(innerRect)->setState("green"); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("extendedRect")); + QQuickItemPrivate::get(innerRect)->setState("green"); rect->doSomething(); QCOMPARE(rect->color(),QColor("blue")); QCOMPARE(innerRect->color(),QColor("green")); @@ -500,7 +500,7 @@ void tst_qdeclarativestates::signalOverrideCrash() MyRect *rect = qobject_cast<MyRect*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate::get(rect)->setState("overridden"); + QQuickItemPrivate::get(rect)->setState("overridden"); rect->doSomething(); } @@ -509,12 +509,12 @@ void tst_qdeclarativestates::signalOverrideCrash2() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("signalOverrideCrash2.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate::get(rect)->setState("state1"); - QSGItemPrivate::get(rect)->setState("state2"); - QSGItemPrivate::get(rect)->setState("state1"); + QQuickItemPrivate::get(rect)->setState("state1"); + QQuickItemPrivate::get(rect)->setState("state2"); + QQuickItemPrivate::get(rect)->setState("state1"); delete rect; } @@ -525,10 +525,10 @@ void tst_qdeclarativestates::parentChange() { QDeclarativeComponent rectComponent(&engine, TESTDATA("parentChange1.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); QDeclarativeListReference list(rect, "states"); @@ -536,14 +536,14 @@ void tst_qdeclarativestates::parentChange() QVERIFY(state != 0); qmlExecuteDeferred(state); - QSGParentChange *pChange = qobject_cast<QSGParentChange*>(state->operationAt(0)); + QQuickParentChange *pChange = qobject_cast<QQuickParentChange*>(state->operationAt(0)); QVERIFY(pChange != 0); - QSGItem *nParent = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("NewParent")); + QQuickItem *nParent = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("NewParent")); QVERIFY(nParent != 0); QCOMPARE(pChange->parent(), nParent); - QSGItemPrivate::get(rect)->setState("reparented"); + QQuickItemPrivate::get(rect)->setState("reparented"); QCOMPARE(innerRect->rotation(), qreal(0)); QCOMPARE(innerRect->scale(), qreal(1)); QCOMPARE(innerRect->x(), qreal(-133)); @@ -552,10 +552,10 @@ void tst_qdeclarativestates::parentChange() { QDeclarativeComponent rectComponent(&engine, TESTDATA("parentChange2.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); rectPrivate->setState("reparented"); @@ -567,10 +567,10 @@ void tst_qdeclarativestates::parentChange() { QDeclarativeComponent rectComponent(&engine, TESTDATA("parentChange3.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); rectPrivate->setState("reparented"); @@ -589,13 +589,13 @@ void tst_qdeclarativestates::parentChange() { QDeclarativeComponent rectComponent(&engine, TESTDATA("parentChange6.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); - QSGItemPrivate::get(rect)->setState("reparented"); + QQuickItemPrivate::get(rect)->setState("reparented"); QCOMPARE(innerRect->rotation(), qreal(180)); QCOMPARE(innerRect->scale(), qreal(1)); QCOMPARE(innerRect->x(), qreal(-105)); @@ -609,14 +609,14 @@ void tst_qdeclarativestates::parentChangeErrors() { QDeclarativeComponent rectComponent(&engine, TESTDATA("parentChange4.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); QTest::ignoreMessage(QtWarningMsg, fullDataPath("parentChange4.qml") + ":25:9: QML ParentChange: Unable to preserve appearance under non-uniform scale"); - QSGItemPrivate::get(rect)->setState("reparented"); + QQuickItemPrivate::get(rect)->setState("reparented"); QCOMPARE(innerRect->rotation(), qreal(0)); QCOMPARE(innerRect->scale(), qreal(1)); QCOMPARE(innerRect->x(), qreal(5)); @@ -625,14 +625,14 @@ void tst_qdeclarativestates::parentChangeErrors() { QDeclarativeComponent rectComponent(&engine, TESTDATA("parentChange5.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); QTest::ignoreMessage(QtWarningMsg, fullDataPath("parentChange5.qml") + ":25:9: QML ParentChange: Unable to preserve appearance under complex transform"); - QSGItemPrivate::get(rect)->setState("reparented"); + QQuickItemPrivate::get(rect)->setState("reparented"); QCOMPARE(innerRect->rotation(), qreal(0)); QCOMPARE(innerRect->scale(), qreal(1)); QCOMPARE(innerRect->x(), qreal(5)); @@ -645,11 +645,11 @@ void tst_qdeclarativestates::anchorChanges() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChanges1.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); QDeclarativeListReference list(rect, "states"); @@ -657,15 +657,15 @@ void tst_qdeclarativestates::anchorChanges() QVERIFY(state != 0); qmlExecuteDeferred(state); - QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0)); + QQuickAnchorChanges *aChanges = qobject_cast<QQuickAnchorChanges*>(state->operationAt(0)); QVERIFY(aChanges != 0); rectPrivate->setState("right"); QCOMPARE(innerRect->x(), qreal(150)); - QCOMPARE(aChanges->object(), qobject_cast<QSGItem*>(innerRect)); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QSGAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all) - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine); + QCOMPARE(aChanges->object(), qobject_cast<QQuickItem*>(innerRect)); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QQuickAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all) + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine); rectPrivate->setState(""); QCOMPARE(innerRect->x(), qreal(5)); @@ -678,11 +678,11 @@ void tst_qdeclarativestates::anchorChanges2() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChanges2.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); rectPrivate->setState("right"); @@ -699,17 +699,17 @@ void tst_qdeclarativestates::anchorChanges3() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChanges3.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); - QSGItem *leftGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("LeftGuideline")); + QQuickItem *leftGuideline = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("LeftGuideline")); QVERIFY(leftGuideline != 0); - QSGItem *bottomGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("BottomGuideline")); + QQuickItem *bottomGuideline = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("BottomGuideline")); QVERIFY(bottomGuideline != 0); QDeclarativeListReference list(rect, "states"); @@ -717,19 +717,19 @@ void tst_qdeclarativestates::anchorChanges3() QVERIFY(state != 0); qmlExecuteDeferred(state); - QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0)); + QQuickAnchorChanges *aChanges = qobject_cast<QQuickAnchorChanges*>(state->operationAt(0)); QVERIFY(aChanges != 0); rectPrivate->setState("reanchored"); - QCOMPARE(aChanges->object(), qobject_cast<QSGItem*>(innerRect)); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->left().item, QSGItemPrivate::get(leftGuideline)->left().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QSGItemPrivate::get(leftGuideline)->left().anchorLine); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->top().item, rectPrivate->top().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->top().anchorLine, rectPrivate->top().anchorLine); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->bottom().item, QSGItemPrivate::get(bottomGuideline)->bottom().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->bottom().anchorLine, QSGItemPrivate::get(bottomGuideline)->bottom().anchorLine); + QCOMPARE(aChanges->object(), qobject_cast<QQuickItem*>(innerRect)); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->left().item, QQuickItemPrivate::get(leftGuideline)->left().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QQuickItemPrivate::get(leftGuideline)->left().anchorLine); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->top().item, rectPrivate->top().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->top().anchorLine, rectPrivate->top().anchorLine); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->bottom().item, QQuickItemPrivate::get(bottomGuideline)->bottom().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->bottom().anchorLine, QQuickItemPrivate::get(bottomGuideline)->bottom().anchorLine); QCOMPARE(innerRect->x(), qreal(10)); QCOMPARE(innerRect->y(), qreal(0)); @@ -750,16 +750,16 @@ void tst_qdeclarativestates::anchorChanges4() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChanges4.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); - QSGItem *leftGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("LeftGuideline")); + QQuickItem *leftGuideline = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("LeftGuideline")); QVERIFY(leftGuideline != 0); - QSGItem *bottomGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("BottomGuideline")); + QQuickItem *bottomGuideline = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("BottomGuideline")); QVERIFY(bottomGuideline != 0); QDeclarativeListReference list(rect, "states"); @@ -767,15 +767,15 @@ void tst_qdeclarativestates::anchorChanges4() QVERIFY(state != 0); qmlExecuteDeferred(state); - QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0)); + QQuickAnchorChanges *aChanges = qobject_cast<QQuickAnchorChanges*>(state->operationAt(0)); QVERIFY(aChanges != 0); - QSGItemPrivate::get(rect)->setState("reanchored"); - QCOMPARE(aChanges->object(), qobject_cast<QSGItem*>(innerRect)); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->horizontalCenter().item, QSGItemPrivate::get(bottomGuideline)->horizontalCenter().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->horizontalCenter().anchorLine, QSGItemPrivate::get(bottomGuideline)->horizontalCenter().anchorLine); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->verticalCenter().item, QSGItemPrivate::get(leftGuideline)->verticalCenter().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->verticalCenter().anchorLine, QSGItemPrivate::get(leftGuideline)->verticalCenter().anchorLine); + QQuickItemPrivate::get(rect)->setState("reanchored"); + QCOMPARE(aChanges->object(), qobject_cast<QQuickItem*>(innerRect)); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->horizontalCenter().item, QQuickItemPrivate::get(bottomGuideline)->horizontalCenter().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->horizontalCenter().anchorLine, QQuickItemPrivate::get(bottomGuideline)->horizontalCenter().anchorLine); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->verticalCenter().item, QQuickItemPrivate::get(leftGuideline)->verticalCenter().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->verticalCenter().anchorLine, QQuickItemPrivate::get(leftGuideline)->verticalCenter().anchorLine); delete rect; } @@ -785,16 +785,16 @@ void tst_qdeclarativestates::anchorChanges5() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChanges5.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); - QSGItem *leftGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("LeftGuideline")); + QQuickItem *leftGuideline = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("LeftGuideline")); QVERIFY(leftGuideline != 0); - QSGItem *bottomGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("BottomGuideline")); + QQuickItem *bottomGuideline = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("BottomGuideline")); QVERIFY(bottomGuideline != 0); QDeclarativeListReference list(rect, "states"); @@ -802,11 +802,11 @@ void tst_qdeclarativestates::anchorChanges5() QVERIFY(state != 0); qmlExecuteDeferred(state); - QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0)); + QQuickAnchorChanges *aChanges = qobject_cast<QQuickAnchorChanges*>(state->operationAt(0)); QVERIFY(aChanges != 0); - QSGItemPrivate::get(rect)->setState("reanchored"); - QCOMPARE(aChanges->object(), qobject_cast<QSGItem*>(innerRect)); + QQuickItemPrivate::get(rect)->setState("reanchored"); + QCOMPARE(aChanges->object(), qobject_cast<QQuickItem*>(innerRect)); //QCOMPARE(aChanges->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item); //QCOMPARE(aChanges->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine); //QCOMPARE(aChanges->anchors()->baseline().item, leftGuideline->baseline().item); @@ -815,12 +815,12 @@ void tst_qdeclarativestates::anchorChanges5() delete rect; } -void mirrorAnchors(QSGItem *item) { - QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item); +void mirrorAnchors(QQuickItem *item) { + QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); itemPrivate->setLayoutMirror(true); } -qreal offsetRTL(QSGItem *anchorItem, QSGItem *item) { +qreal offsetRTL(QQuickItem *anchorItem, QQuickItem *item) { return anchorItem->width()+2*anchorItem->x()-item->width(); } @@ -829,11 +829,11 @@ void tst_qdeclarativestates::anchorChangesRTL() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChanges1.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); mirrorAnchors(innerRect); @@ -842,15 +842,15 @@ void tst_qdeclarativestates::anchorChangesRTL() QVERIFY(state != 0); qmlExecuteDeferred(state); - QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0)); + QQuickAnchorChanges *aChanges = qobject_cast<QQuickAnchorChanges*>(state->operationAt(0)); QVERIFY(aChanges != 0); rectPrivate->setState("right"); QCOMPARE(innerRect->x(), offsetRTL(rect, innerRect) - qreal(150)); - QCOMPARE(aChanges->object(), qobject_cast<QSGItem*>(innerRect)); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QSGAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all) - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine); + QCOMPARE(aChanges->object(), qobject_cast<QQuickItem*>(innerRect)); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QQuickAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all) + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine); rectPrivate->setState(""); QCOMPARE(innerRect->x(), offsetRTL(rect, innerRect) -qreal(5)); @@ -863,11 +863,11 @@ void tst_qdeclarativestates::anchorChangesRTL2() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChanges2.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); mirrorAnchors(innerRect); @@ -885,18 +885,18 @@ void tst_qdeclarativestates::anchorChangesRTL3() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChanges3.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); - QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect")); + QQuickRectangle *innerRect = qobject_cast<QQuickRectangle*>(rect->findChild<QQuickRectangle*>("MyRect")); QVERIFY(innerRect != 0); mirrorAnchors(innerRect); - QSGItem *leftGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("LeftGuideline")); + QQuickItem *leftGuideline = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("LeftGuideline")); QVERIFY(leftGuideline != 0); - QSGItem *bottomGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("BottomGuideline")); + QQuickItem *bottomGuideline = qobject_cast<QQuickItem*>(rect->findChild<QQuickItem*>("BottomGuideline")); QVERIFY(bottomGuideline != 0); QDeclarativeListReference list(rect, "states"); @@ -904,19 +904,19 @@ void tst_qdeclarativestates::anchorChangesRTL3() QVERIFY(state != 0); qmlExecuteDeferred(state); - QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0)); + QQuickAnchorChanges *aChanges = qobject_cast<QQuickAnchorChanges*>(state->operationAt(0)); QVERIFY(aChanges != 0); rectPrivate->setState("reanchored"); - QCOMPARE(aChanges->object(), qobject_cast<QSGItem*>(innerRect)); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->left().item, QSGItemPrivate::get(leftGuideline)->left().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QSGItemPrivate::get(leftGuideline)->left().anchorLine); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->top().item, rectPrivate->top().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->top().anchorLine, rectPrivate->top().anchorLine); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->bottom().item, QSGItemPrivate::get(bottomGuideline)->bottom().item); - QCOMPARE(QSGItemPrivate::get(aChanges->object())->anchors()->bottom().anchorLine, QSGItemPrivate::get(bottomGuideline)->bottom().anchorLine); + QCOMPARE(aChanges->object(), qobject_cast<QQuickItem*>(innerRect)); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->left().item, QQuickItemPrivate::get(leftGuideline)->left().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QQuickItemPrivate::get(leftGuideline)->left().anchorLine); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->top().item, rectPrivate->top().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->top().anchorLine, rectPrivate->top().anchorLine); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->bottom().item, QQuickItemPrivate::get(bottomGuideline)->bottom().item); + QCOMPARE(QQuickItemPrivate::get(aChanges->object())->anchors()->bottom().anchorLine, QQuickItemPrivate::get(bottomGuideline)->bottom().anchorLine); QCOMPARE(innerRect->x(), offsetRTL(leftGuideline, innerRect) - qreal(10)); QCOMPARE(innerRect->y(), qreal(0)); @@ -940,10 +940,10 @@ void tst_qdeclarativestates::anchorChangesCrash() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorChangesCrash.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate::get(rect)->setState("reanchored"); + QQuickItemPrivate::get(rect)->setState("reanchored"); delete rect; } @@ -951,7 +951,7 @@ void tst_qdeclarativestates::anchorChangesCrash() // QTBUG-12273 void tst_qdeclarativestates::anchorRewindBug() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("anchorRewindBug.qml"))); view->show(); @@ -959,29 +959,29 @@ void tst_qdeclarativestates::anchorRewindBug() QTest::qWaitForWindowShown(view); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(view->rootObject()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(view->rootObject()); QVERIFY(rect != 0); - QSGItem * column = rect->findChild<QSGItem*>("column"); + QQuickItem * column = rect->findChild<QQuickItem*>("column"); QVERIFY(column != 0); - QVERIFY(!QSGItemPrivate::get(column)->heightValid); - QVERIFY(!QSGItemPrivate::get(column)->widthValid); + QVERIFY(!QQuickItemPrivate::get(column)->heightValid); + QVERIFY(!QQuickItemPrivate::get(column)->widthValid); QCOMPARE(column->height(), 200.0); - QSGItemPrivate::get(rect)->setState("reanchored"); + QQuickItemPrivate::get(rect)->setState("reanchored"); // column height and width should stay implicit // and column's implicit resizing should still work - QVERIFY(!QSGItemPrivate::get(column)->heightValid); - QVERIFY(!QSGItemPrivate::get(column)->widthValid); + QVERIFY(!QQuickItemPrivate::get(column)->heightValid); + QVERIFY(!QQuickItemPrivate::get(column)->widthValid); QTRY_COMPARE(column->height(), 100.0); - QSGItemPrivate::get(rect)->setState(""); + QQuickItemPrivate::get(rect)->setState(""); // column height and width should stay implicit // and column's implicit resizing should still work - QVERIFY(!QSGItemPrivate::get(column)->heightValid); - QVERIFY(!QSGItemPrivate::get(column)->widthValid); + QVERIFY(!QQuickItemPrivate::get(column)->heightValid); + QVERIFY(!QQuickItemPrivate::get(column)->widthValid); QTRY_COMPARE(column->height(), 200.0); delete view; @@ -993,20 +993,20 @@ void tst_qdeclarativestates::anchorRewindBug2() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("anchorRewindBug2.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGRectangle *mover = rect->findChild<QSGRectangle*>("mover"); + QQuickRectangle *mover = rect->findChild<QQuickRectangle*>("mover"); QVERIFY(mover != 0); QCOMPARE(mover->y(), qreal(0.0)); QCOMPARE(mover->width(), qreal(50.0)); - QSGItemPrivate::get(rect)->setState("anchored"); + QQuickItemPrivate::get(rect)->setState("anchored"); QCOMPARE(mover->y(), qreal(250.0)); QCOMPARE(mover->width(), qreal(200.0)); - QSGItemPrivate::get(rect)->setState(""); + QQuickItemPrivate::get(rect)->setState(""); QCOMPARE(mover->y(), qreal(0.0)); QCOMPARE(mover->width(), qreal(50.0)); @@ -1019,9 +1019,9 @@ void tst_qdeclarativestates::script() { QDeclarativeComponent rectComponent(&engine, TESTDATA("script.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QCOMPARE(rect->color(),QColor("red")); rectPrivate->setState("blue"); @@ -1037,9 +1037,9 @@ void tst_qdeclarativestates::restoreEntryValues() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("restoreEntryValues.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QCOMPARE(rect->color(),QColor("red")); rectPrivate->setState("blue"); @@ -1054,9 +1054,9 @@ void tst_qdeclarativestates::explicitChanges() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("explicit.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QDeclarativeListReference list(rect, "states"); QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0)); QVERIFY(state != 0); @@ -1087,14 +1087,14 @@ void tst_qdeclarativestates::propertyErrors() { QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("propertyErrors.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); QCOMPARE(rect->color(),QColor("red")); QTest::ignoreMessage(QtWarningMsg, fullDataPath("propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\""); QTest::ignoreMessage(QtWarningMsg, fullDataPath("propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to read-only property \"activeFocus\""); - QSGItemPrivate::get(rect)->setState("blue"); + QQuickItemPrivate::get(rect)->setState("blue"); } void tst_qdeclarativestates::incorrectRestoreBug() @@ -1102,9 +1102,9 @@ void tst_qdeclarativestates::incorrectRestoreBug() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("basicChanges.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QCOMPARE(rect->color(),QColor("red")); rectPrivate->setState("blue"); @@ -1145,9 +1145,9 @@ void tst_qdeclarativestates::deletingChange() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("deleting.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); rectPrivate->setState("blue"); QCOMPARE(rect->color(),QColor("blue")); QCOMPARE(rect->radius(),qreal(5)); @@ -1177,7 +1177,7 @@ void tst_qdeclarativestates::deletingState() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("deletingState.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); QDeclarativeStateGroup *sg = rect->findChild<QDeclarativeStateGroup*>(); @@ -1208,9 +1208,9 @@ void tst_qdeclarativestates::tempState() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("legalTempState.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QTest::ignoreMessage(QtDebugMsg, "entering placed"); QTest::ignoreMessage(QtDebugMsg, "entering idle"); rectPrivate->setState("placed"); @@ -1222,9 +1222,9 @@ void tst_qdeclarativestates::illegalTempState() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("illegalTempState.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML StateGroup: Can't apply a state change as part of a state definition."); rectPrivate->setState("placed"); QCOMPARE(rectPrivate->state(), QLatin1String("placed")); @@ -1235,9 +1235,9 @@ void tst_qdeclarativestates::nonExistantProperty() QDeclarativeEngine engine; QDeclarativeComponent rectComponent(&engine, TESTDATA("nonExistantProp.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(rectComponent.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QTest::ignoreMessage(QtWarningMsg, fullDataPath("nonExistantProp.qml") + ":9:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\""); rectPrivate->setState("blue"); QCOMPARE(rectPrivate->state(), QLatin1String("blue")); @@ -1248,15 +1248,15 @@ void tst_qdeclarativestates::reset() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, TESTDATA("reset.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGImage *image = rect->findChild<QSGImage*>(); + QQuickImage *image = rect->findChild<QQuickImage*>(); QVERIFY(image != 0); QCOMPARE(image->width(), qreal(40.)); QCOMPARE(image->height(), qreal(20.)); - QSGItemPrivate::get(rect)->setState("state1"); + QQuickItemPrivate::get(rect)->setState("state1"); QCOMPARE(image->width(), 20.0); QCOMPARE(image->height(), qreal(20.)); @@ -1280,9 +1280,9 @@ void tst_qdeclarativestates::whenOrdering() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, TESTDATA("whenOrdering.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QCOMPARE(rectPrivate->state(), QLatin1String("")); rect->setProperty("condition2", true); @@ -1303,16 +1303,16 @@ void tst_qdeclarativestates::urlResolution() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, TESTDATA("urlResolution.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItem *myType = rect->findChild<QSGItem*>("MyType"); - QSGImage *image1 = rect->findChild<QSGImage*>("image1"); - QSGImage *image2 = rect->findChild<QSGImage*>("image2"); - QSGImage *image3 = rect->findChild<QSGImage*>("image3"); + QQuickItem *myType = rect->findChild<QQuickItem*>("MyType"); + QQuickImage *image1 = rect->findChild<QQuickImage*>("image1"); + QQuickImage *image2 = rect->findChild<QQuickImage*>("image2"); + QQuickImage *image3 = rect->findChild<QQuickImage*>("image3"); QVERIFY(myType != 0 && image1 != 0 && image2 != 0 && image3 != 0); - QSGItemPrivate::get(myType)->setState("SetImageState"); + QQuickItemPrivate::get(myType)->setState("SetImageState"); QUrl resolved = QUrl::fromLocalFile(TESTDATA("Implementation/images/qt-logo.png")); QCOMPARE(image1->source(), resolved); QCOMPARE(image2->source(), resolved); @@ -1324,9 +1324,9 @@ void tst_qdeclarativestates::unnamedWhen() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, TESTDATA("unnamedWhen.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QCOMPARE(rectPrivate->state(), QLatin1String("")); QCOMPARE(rect->property("stateString").toString(), QLatin1String("")); @@ -1343,9 +1343,9 @@ void tst_qdeclarativestates::returnToBase() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, TESTDATA("returnToBase.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QCOMPARE(rectPrivate->state(), QLatin1String("")); QCOMPARE(rect->property("stateString").toString(), QLatin1String("")); @@ -1363,10 +1363,10 @@ void tst_qdeclarativestates::extendsBug() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, TESTDATA("extendsBug.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); - QSGRectangle *greenRect = rect->findChild<QSGRectangle*>("greenRect"); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); + QQuickRectangle *greenRect = rect->findChild<QQuickRectangle*>("greenRect"); rectPrivate->setState("b"); QCOMPARE(greenRect->x(), qreal(100)); @@ -1378,10 +1378,10 @@ void tst_qdeclarativestates::editProperties() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, TESTDATA("editProperties.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); QDeclarativeStateGroup *stateGroup = rectPrivate->_states(); QVERIFY(stateGroup != 0); @@ -1401,7 +1401,7 @@ void tst_qdeclarativestates::editProperties() QDeclarativePropertyChanges *propertyChangesGreen = qobject_cast<QDeclarativePropertyChanges*>(greenState->operationAt(0)); QVERIFY(propertyChangesGreen != 0); - QSGRectangle *childRect = rect->findChild<QSGRectangle*>("rect2"); + QQuickRectangle *childRect = rect->findChild<QQuickRectangle*>("rect2"); QVERIFY(childRect != 0); QCOMPARE(childRect->width(), qreal(402)); QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); @@ -1506,9 +1506,9 @@ void tst_qdeclarativestates::QTBUG_14830() QDeclarativeEngine engine; QDeclarativeComponent c(&engine, TESTDATA("QTBUG-14830.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItem *item = rect->findChild<QSGItem*>("area"); + QQuickItem *item = rect->findChild<QQuickItem*>("area"); QCOMPARE(item->width(), qreal(171)); } @@ -1519,10 +1519,10 @@ void tst_qdeclarativestates::avoidFastForward() //shouldn't fast forward if there isn't a transition QDeclarativeComponent c(&engine, TESTDATA("avoidFastForward.qml")); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create()); QVERIFY(rect != 0); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); rectPrivate->setState("a"); QCOMPARE(rect->property("updateCount").toInt(), 1); } diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp index d6cf8c058f..1e795099e8 100644 --- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp +++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp @@ -43,7 +43,7 @@ #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> #include <private/qdeclarativetimer_p.h> -#include <QtDeclarative/qsgitem.h> +#include <QtDeclarative/qquickitem.h> #include <QDebug> class tst_qdeclarativetimer : public QObject @@ -319,7 +319,7 @@ void tst_qdeclarativetimer::parentProperty() QDeclarativeEngine engine; QDeclarativeComponent component(&engine); component.setData(QByteArray("import QtQuick 2.0\nItem { Timer { objectName: \"timer\"; running: parent.visible } }"), QUrl::fromLocalFile("")); - QSGItem *item = qobject_cast<QSGItem*>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item != 0); QDeclarativeTimer *timer = item->findChild<QDeclarativeTimer*>("timer"); QVERIFY(timer != 0); diff --git a/tests/auto/declarative/qmlmin/tst_qmlmin.cpp b/tests/auto/declarative/qmlmin/tst_qmlmin.cpp index 7c33670327..38de65f826 100644 --- a/tests/auto/declarative/qmlmin/tst_qmlmin.cpp +++ b/tests/auto/declarative/qmlmin/tst_qmlmin.cpp @@ -44,7 +44,6 @@ #include <QDir> #include <QProcess> #include <QDebug> -#include <QSGView> #include <QDeclarativeError> #include <cstdlib> @@ -95,7 +94,7 @@ void tst_qmlmin::initTestCase() excludedDirs << "doc/src/snippets/qtquick1/imports"; // Add invalid files (i.e. files with syntax errors) - invalidFiles << "tests/auto/declarative/qsgloader/data/InvalidSourceComponent.qml"; + invalidFiles << "tests/auto/declarative/qquickloader/data/InvalidSourceComponent.qml"; invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml"; invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml"; invalidFiles << "tests/auto/declarative/qdeclarativelanguage/data/property.4.qml"; diff --git a/tests/auto/declarative/qsganimatedimage/data/colors.gif b/tests/auto/declarative/qquickanimatedimage/data/colors.gif Binary files differindex 1270bfaa79..1270bfaa79 100644 --- a/tests/auto/declarative/qsganimatedimage/data/colors.gif +++ b/tests/auto/declarative/qquickanimatedimage/data/colors.gif diff --git a/tests/auto/declarative/qsganimatedimage/data/colors.qml b/tests/auto/declarative/qquickanimatedimage/data/colors.qml index 5ccc0148dd..5ccc0148dd 100644 --- a/tests/auto/declarative/qsganimatedimage/data/colors.qml +++ b/tests/auto/declarative/qquickanimatedimage/data/colors.qml diff --git a/tests/auto/declarative/qsganimatedimage/data/hearts.gif b/tests/auto/declarative/qquickanimatedimage/data/hearts.gif Binary files differindex cfb55f27f5..cfb55f27f5 100644 --- a/tests/auto/declarative/qsganimatedimage/data/hearts.gif +++ b/tests/auto/declarative/qquickanimatedimage/data/hearts.gif diff --git a/tests/auto/declarative/qsganimatedimage/data/hearts.qml b/tests/auto/declarative/qquickanimatedimage/data/hearts.qml index 717bab430b..717bab430b 100644 --- a/tests/auto/declarative/qsganimatedimage/data/hearts.qml +++ b/tests/auto/declarative/qquickanimatedimage/data/hearts.qml diff --git a/tests/auto/declarative/qsganimatedimage/data/qmldir b/tests/auto/declarative/qquickanimatedimage/data/qmldir index ef7c1f44f3..ef7c1f44f3 100644 --- a/tests/auto/declarative/qsganimatedimage/data/qmldir +++ b/tests/auto/declarative/qquickanimatedimage/data/qmldir diff --git a/tests/auto/declarative/qsganimatedimage/data/qtbug-16520.qml b/tests/auto/declarative/qquickanimatedimage/data/qtbug-16520.qml index da77a4063b..da77a4063b 100644 --- a/tests/auto/declarative/qsganimatedimage/data/qtbug-16520.qml +++ b/tests/auto/declarative/qquickanimatedimage/data/qtbug-16520.qml diff --git a/tests/auto/declarative/qsganimatedimage/data/stickman.gif b/tests/auto/declarative/qquickanimatedimage/data/stickman.gif Binary files differindex 7c4cd18687..7c4cd18687 100644 --- a/tests/auto/declarative/qsganimatedimage/data/stickman.gif +++ b/tests/auto/declarative/qquickanimatedimage/data/stickman.gif diff --git a/tests/auto/declarative/qsganimatedimage/data/stickman.qml b/tests/auto/declarative/qquickanimatedimage/data/stickman.qml index a47924de21..a47924de21 100644 --- a/tests/auto/declarative/qsganimatedimage/data/stickman.qml +++ b/tests/auto/declarative/qquickanimatedimage/data/stickman.qml diff --git a/tests/auto/declarative/qsganimatedimage/data/stickmanerror1.qml b/tests/auto/declarative/qquickanimatedimage/data/stickmanerror1.qml index 4f823b3d70..4f823b3d70 100644 --- a/tests/auto/declarative/qsganimatedimage/data/stickmanerror1.qml +++ b/tests/auto/declarative/qquickanimatedimage/data/stickmanerror1.qml diff --git a/tests/auto/declarative/qsganimatedimage/data/stickmanpause.qml b/tests/auto/declarative/qquickanimatedimage/data/stickmanpause.qml index ef771ed56f..ef771ed56f 100644 --- a/tests/auto/declarative/qsganimatedimage/data/stickmanpause.qml +++ b/tests/auto/declarative/qquickanimatedimage/data/stickmanpause.qml diff --git a/tests/auto/declarative/qsganimatedimage/data/stickmanscaled.qml b/tests/auto/declarative/qquickanimatedimage/data/stickmanscaled.qml index 1ef1f95165..1ef1f95165 100644 --- a/tests/auto/declarative/qsganimatedimage/data/stickmanscaled.qml +++ b/tests/auto/declarative/qquickanimatedimage/data/stickmanscaled.qml diff --git a/tests/auto/declarative/qsganimatedimage/data/stickmanstopped.qml b/tests/auto/declarative/qquickanimatedimage/data/stickmanstopped.qml index 0bf80b8972..0bf80b8972 100644 --- a/tests/auto/declarative/qsganimatedimage/data/stickmanstopped.qml +++ b/tests/auto/declarative/qquickanimatedimage/data/stickmanstopped.qml diff --git a/tests/auto/declarative/qsganimatedimage/qsganimatedimage.pro b/tests/auto/declarative/qquickanimatedimage/qquickanimatedimage.pro index eaf83ccfef..d6a40e11ce 100644 --- a/tests/auto/declarative/qsganimatedimage/qsganimatedimage.pro +++ b/tests/auto/declarative/qquickanimatedimage/qquickanimatedimage.pro @@ -1,7 +1,7 @@ CONFIG += testcase -TARGET = tst_qsganimatedimage +TARGET = tst_qquickanimatedimage HEADERS += ../shared/testhttpserver.h -SOURCES += tst_qsganimatedimage.cpp ../shared/testhttpserver.cpp +SOURCES += tst_qquickanimatedimage.cpp ../shared/testhttpserver.cpp macx:CONFIG -= app_bundle testDataFiles.files = data diff --git a/tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp b/tests/auto/declarative/qquickanimatedimage/tst_qquickanimatedimage.cpp index aa39c52a31..c9394efa37 100644 --- a/tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp +++ b/tests/auto/declarative/qquickanimatedimage/tst_qquickanimatedimage.cpp @@ -41,21 +41,21 @@ #include <qtest.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgview.h> -#include <private/qsgrectangle_p.h> -#include <private/qsgimage_p.h> -#include <private/qsganimatedimage_p.h> +#include <QtDeclarative/qquickview.h> +#include <private/qquickrectangle_p.h> +#include <private/qquickimage_p.h> +#include <private/qquickanimatedimage_p.h> #include <QSignalSpy> #include <QtDeclarative/qdeclarativecontext.h> #include "../shared/testhttpserver.h" #include "../shared/util.h" -class tst_qsganimatedimage : public QObject +class tst_qquickanimatedimage : public QObject { Q_OBJECT public: - tst_qsganimatedimage() {} + tst_qquickanimatedimage() {} private slots: void play(); @@ -76,22 +76,22 @@ private slots: }; -void tst_qsganimatedimage::play() +void tst_qquickanimatedimage::play() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine, QUrl::fromLocalFile(TESTDATA("stickman.qml"))); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(component.create()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); delete anim; } -void tst_qsganimatedimage::pause() +void tst_qquickanimatedimage::pause() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine, QUrl::fromLocalFile(TESTDATA("stickmanpause.qml"))); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(component.create()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); QVERIFY(anim->isPaused()); @@ -99,11 +99,11 @@ void tst_qsganimatedimage::pause() delete anim; } -void tst_qsganimatedimage::stopped() +void tst_qquickanimatedimage::stopped() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine, QUrl::fromLocalFile(TESTDATA("stickmanstopped.qml"))); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(component.create()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(!anim->isPlaying()); QCOMPARE(anim->currentFrame(), 0); @@ -111,11 +111,11 @@ void tst_qsganimatedimage::stopped() delete anim; } -void tst_qsganimatedimage::setFrame() +void tst_qquickanimatedimage::setFrame() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine, QUrl::fromLocalFile(TESTDATA("stickmanpause.qml"))); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(component.create()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); QCOMPARE(anim->currentFrame(), 2); @@ -123,11 +123,11 @@ void tst_qsganimatedimage::setFrame() delete anim; } -void tst_qsganimatedimage::frameCount() +void tst_qquickanimatedimage::frameCount() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine, QUrl::fromLocalFile(TESTDATA("colors.qml"))); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(component.create()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); QCOMPARE(anim->frameCount(), 3); @@ -135,15 +135,15 @@ void tst_qsganimatedimage::frameCount() delete anim; } -void tst_qsganimatedimage::mirror_running() +void tst_qquickanimatedimage::mirror_running() { // test where mirror is set to true after animation has started - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->show(); canvas->setSource(QUrl::fromLocalFile(TESTDATA("hearts.qml"))); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(canvas->rootObject()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(canvas->rootObject()); QVERIFY(anim); int width = anim->property("width").toInt(); @@ -182,15 +182,15 @@ void tst_qsganimatedimage::mirror_running() delete canvas; } -void tst_qsganimatedimage::mirror_notRunning() +void tst_qquickanimatedimage::mirror_notRunning() { QFETCH(QUrl, fileUrl); - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->show(); canvas->setSource(fileUrl); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(canvas->rootObject()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(canvas->rootObject()); QVERIFY(anim); int width = anim->property("width").toInt(); @@ -218,7 +218,7 @@ void tst_qsganimatedimage::mirror_notRunning() delete canvas; } -void tst_qsganimatedimage::mirror_notRunning_data() +void tst_qquickanimatedimage::mirror_notRunning_data() { QTest::addColumn<QUrl>("fileUrl"); @@ -226,7 +226,7 @@ void tst_qsganimatedimage::mirror_notRunning_data() QTest::newRow("stopped") << QUrl::fromLocalFile(TESTDATA("stickmanstopped.qml")); } -void tst_qsganimatedimage::remote() +void tst_qquickanimatedimage::remote() { QFETCH(QString, fileName); QFETCH(bool, paused); @@ -239,7 +239,7 @@ void tst_qsganimatedimage::remote() QDeclarativeComponent component(&engine, QUrl("http://127.0.0.1:14449/" + fileName)); QTRY_VERIFY(component.isReady()); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(component.create()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(component.create()); QVERIFY(anim); QTRY_VERIFY(anim->isPlaying()); @@ -247,16 +247,16 @@ void tst_qsganimatedimage::remote() QTRY_VERIFY(anim->isPaused()); QCOMPARE(anim->currentFrame(), 2); } - QVERIFY(anim->status() != QSGAnimatedImage::Error); + QVERIFY(anim->status() != QQuickAnimatedImage::Error); delete anim; } -void tst_qsganimatedimage::sourceSize() +void tst_qquickanimatedimage::sourceSize() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine, QUrl::fromLocalFile(TESTDATA("stickmanscaled.qml"))); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(component.create()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(component.create()); QVERIFY(anim); QCOMPARE(anim->width(),240.0); QCOMPARE(anim->height(),180.0); @@ -265,7 +265,7 @@ void tst_qsganimatedimage::sourceSize() delete anim; } -void tst_qsganimatedimage::sourceSizeReadOnly() +void tst_qquickanimatedimage::sourceSizeReadOnly() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine, QUrl::fromLocalFile(TESTDATA("stickmanerror1.qml"))); @@ -273,7 +273,7 @@ void tst_qsganimatedimage::sourceSizeReadOnly() QCOMPARE(component.errors().at(0).description(), QString("Invalid property assignment: \"sourceSize\" is a read-only property")); } -void tst_qsganimatedimage::remote_data() +void tst_qquickanimatedimage::remote_data() { QTest::addColumn<QString>("fileName"); QTest::addColumn<bool>("paused"); @@ -282,7 +282,7 @@ void tst_qsganimatedimage::remote_data() QTest::newRow("paused") << "stickmanpause.qml" << true; } -void tst_qsganimatedimage::invalidSource() +void tst_qquickanimatedimage::invalidSource() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); @@ -291,7 +291,7 @@ void tst_qsganimatedimage::invalidSource() QTest::ignoreMessage(QtWarningMsg, "file::2:2: QML AnimatedImage: Error Reading Animated Image File file:no-such-file.gif"); - QSGAnimatedImage *anim = qobject_cast<QSGAnimatedImage *>(component.create()); + QQuickAnimatedImage *anim = qobject_cast<QQuickAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(!anim->isPlaying()); @@ -301,7 +301,7 @@ void tst_qsganimatedimage::invalidSource() QTRY_VERIFY(anim->status() == 3); } -void tst_qsganimatedimage::qtbug_16520() +void tst_qquickanimatedimage::qtbug_16520() { TestHTTPServer server(14449); QVERIFY(server.isValid()); @@ -311,9 +311,9 @@ void tst_qsganimatedimage::qtbug_16520() QDeclarativeComponent component(&engine, QUrl::fromLocalFile(TESTDATA("qtbug-16520.qml"))); QTRY_VERIFY(component.isReady()); - QSGRectangle *root = qobject_cast<QSGRectangle *>(component.create()); + QQuickRectangle *root = qobject_cast<QQuickRectangle *>(component.create()); QVERIFY(root); - QSGAnimatedImage *anim = root->findChild<QSGAnimatedImage*>("anim"); + QQuickAnimatedImage *anim = root->findChild<QQuickAnimatedImage*>("anim"); anim->setProperty("source", "http://127.0.0.1:14449/stickman.gif"); @@ -323,7 +323,7 @@ void tst_qsganimatedimage::qtbug_16520() delete anim; } -void tst_qsganimatedimage::progressAndStatusChanges() +void tst_qquickanimatedimage::progressAndStatusChanges() { TestHTTPServer server(14449); QVERIFY(server.isValid()); @@ -335,18 +335,18 @@ void tst_qsganimatedimage::progressAndStatusChanges() ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(TESTDATA("stickman.gif"))); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); - QVERIFY(obj->status() == QSGImage::Ready); + QVERIFY(obj->status() == QQuickImage::Ready); QTRY_VERIFY(obj->progress() == 1.0); QSignalSpy sourceSpy(obj, SIGNAL(sourceChanged(const QUrl &))); QSignalSpy progressSpy(obj, SIGNAL(progressChanged(qreal))); - QSignalSpy statusSpy(obj, SIGNAL(statusChanged(QSGImageBase::Status))); + QSignalSpy statusSpy(obj, SIGNAL(statusChanged(QQuickImageBase::Status))); // Loading local file ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(TESTDATA("colors.gif"))); - QTRY_VERIFY(obj->status() == QSGImage::Ready); + QTRY_VERIFY(obj->status() == QQuickImage::Ready); QTRY_VERIFY(obj->progress() == 1.0); QTRY_COMPARE(sourceSpy.count(), 1); QTRY_COMPARE(progressSpy.count(), 0); @@ -354,22 +354,22 @@ void tst_qsganimatedimage::progressAndStatusChanges() // Loading remote file ctxt->setContextProperty("srcImage", "http://127.0.0.1:14449/stickman.gif"); - QTRY_VERIFY(obj->status() == QSGImage::Loading); + QTRY_VERIFY(obj->status() == QQuickImage::Loading); QTRY_VERIFY(obj->progress() == 0.0); - QTRY_VERIFY(obj->status() == QSGImage::Ready); + QTRY_VERIFY(obj->status() == QQuickImage::Ready); QTRY_VERIFY(obj->progress() == 1.0); QTRY_COMPARE(sourceSpy.count(), 2); QTRY_VERIFY(progressSpy.count() > 1); QTRY_COMPARE(statusSpy.count(), 2); ctxt->setContextProperty("srcImage", ""); - QTRY_VERIFY(obj->status() == QSGImage::Null); + QTRY_VERIFY(obj->status() == QQuickImage::Null); QTRY_VERIFY(obj->progress() == 0.0); QTRY_COMPARE(sourceSpy.count(), 3); QTRY_VERIFY(progressSpy.count() > 2); QTRY_COMPARE(statusSpy.count(), 3); } -QTEST_MAIN(tst_qsganimatedimage) +QTEST_MAIN(tst_qquickanimatedimage) -#include "tst_qsganimatedimage.moc" +#include "tst_qquickanimatedimage.moc" diff --git a/tests/auto/declarative/qsgborderimage/data/colors-mirror.png b/tests/auto/declarative/qquickborderimage/data/colors-mirror.png Binary files differindex e30870dd1e..e30870dd1e 100644 --- a/tests/auto/declarative/qsgborderimage/data/colors-mirror.png +++ b/tests/auto/declarative/qquickborderimage/data/colors-mirror.png diff --git a/tests/auto/declarative/qsgborderimage/data/colors-round-quotes.sci b/tests/auto/declarative/qquickborderimage/data/colors-round-quotes.sci index 294f3cfe48..294f3cfe48 100644 --- a/tests/auto/declarative/qsgborderimage/data/colors-round-quotes.sci +++ b/tests/auto/declarative/qquickborderimage/data/colors-round-quotes.sci diff --git a/tests/auto/declarative/qsgborderimage/data/colors-round-remote.sci b/tests/auto/declarative/qquickborderimage/data/colors-round-remote.sci index c673bed598..c673bed598 100644 --- a/tests/auto/declarative/qsgborderimage/data/colors-round-remote.sci +++ b/tests/auto/declarative/qquickborderimage/data/colors-round-remote.sci diff --git a/tests/auto/declarative/qsgborderimage/data/colors-round.sci b/tests/auto/declarative/qquickborderimage/data/colors-round.sci index 5d2f49f0e1..5d2f49f0e1 100644 --- a/tests/auto/declarative/qsgborderimage/data/colors-round.sci +++ b/tests/auto/declarative/qquickborderimage/data/colors-round.sci diff --git a/tests/auto/declarative/qsgborderimage/data/colors.png b/tests/auto/declarative/qquickborderimage/data/colors.png Binary files differindex dfb62f3d64..dfb62f3d64 100644 --- a/tests/auto/declarative/qsgborderimage/data/colors.png +++ b/tests/auto/declarative/qquickborderimage/data/colors.png diff --git a/tests/auto/declarative/qsgborderimage/data/heart200.png b/tests/auto/declarative/qquickborderimage/data/heart200.png Binary files differindex 5a31ae8f4d..5a31ae8f4d 100644 --- a/tests/auto/declarative/qsgborderimage/data/heart200.png +++ b/tests/auto/declarative/qquickborderimage/data/heart200.png diff --git a/tests/auto/declarative/qsgborderimage/data/invalid.sci b/tests/auto/declarative/qquickborderimage/data/invalid.sci index 98c72c9bf1..98c72c9bf1 100644 --- a/tests/auto/declarative/qsgborderimage/data/invalid.sci +++ b/tests/auto/declarative/qquickborderimage/data/invalid.sci diff --git a/tests/auto/declarative/qsgborderimage/data/mirror.qml b/tests/auto/declarative/qquickborderimage/data/mirror.qml index abab076e08..abab076e08 100644 --- a/tests/auto/declarative/qsgborderimage/data/mirror.qml +++ b/tests/auto/declarative/qquickborderimage/data/mirror.qml diff --git a/tests/auto/declarative/qsgborderimage/qsgborderimage.pro b/tests/auto/declarative/qquickborderimage/qquickborderimage.pro index 65200a9a93..b1ccf4a939 100644 --- a/tests/auto/declarative/qsgborderimage/qsgborderimage.pro +++ b/tests/auto/declarative/qquickborderimage/qquickborderimage.pro @@ -1,9 +1,9 @@ CONFIG += testcase -TARGET = tst_qsgborderimage +TARGET = tst_qquickborderimage macx:CONFIG -= app_bundle HEADERS += ../shared/testhttpserver.h -SOURCES += tst_qsgborderimage.cpp ../shared/testhttpserver.cpp +SOURCES += tst_qquickborderimage.cpp ../shared/testhttpserver.cpp testDataFiles.files = data testDataFiles.path = . diff --git a/tests/auto/declarative/qsgborderimage/tst_qsgborderimage.cpp b/tests/auto/declarative/qquickborderimage/tst_qquickborderimage.cpp index 0835a66dd7..4fb6ed7057 100644 --- a/tests/auto/declarative/qsgborderimage/tst_qsgborderimage.cpp +++ b/tests/auto/declarative/qquickborderimage/tst_qquickborderimage.cpp @@ -48,11 +48,11 @@ #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <private/qsgborderimage_p.h> -#include <private/qsgimagebase_p.h> -#include <private/qsgscalegrid_p_p.h> -#include <private/qsgloader_p.h> -#include <QtDeclarative/qsgview.h> +#include <private/qquickborderimage_p.h> +#include <private/qquickimagebase_p.h> +#include <private/qquickscalegrid_p_p.h> +#include <private/qquickloader_p.h> +#include <QtDeclarative/qquickview.h> #include <QtDeclarative/qdeclarativecontext.h> #include "../shared/testhttpserver.h" @@ -61,12 +61,12 @@ #define SERVER_PORT 14446 #define SERVER_ADDR "http://127.0.0.1:14446" -class tst_qsgborderimage : public QObject +class tst_qquickborderimage : public QObject { Q_OBJECT public: - tst_qsgborderimage(); + tst_qquickborderimage(); private slots: void noSource(); @@ -87,27 +87,27 @@ private: QDeclarativeEngine engine; }; -tst_qsgborderimage::tst_qsgborderimage() +tst_qquickborderimage::tst_qquickborderimage() { } -void tst_qsgborderimage::noSource() +void tst_qquickborderimage::noSource() { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->source(), QUrl()); QCOMPARE(obj->width(), 0.); QCOMPARE(obj->height(), 0.); - QCOMPARE(obj->horizontalTileMode(), QSGBorderImage::Stretch); - QCOMPARE(obj->verticalTileMode(), QSGBorderImage::Stretch); + QCOMPARE(obj->horizontalTileMode(), QQuickBorderImage::Stretch); + QCOMPARE(obj->verticalTileMode(), QQuickBorderImage::Stretch); delete obj; } -void tst_qsgborderimage::imageSource_data() +void tst_qquickborderimage::imageSource_data() { QTest::addColumn<QString>("source"); QTest::addColumn<bool>("remote"); @@ -121,7 +121,7 @@ void tst_qsgborderimage::imageSource_data() << "file::2:1: QML BorderImage: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found"; } -void tst_qsgborderimage::imageSource() +void tst_qquickborderimage::imageSource() { QFETCH(QString, source); QFETCH(bool, remote); @@ -140,90 +140,90 @@ void tst_qsgborderimage::imageSource() QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + source + "\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); if (remote) - QTRY_VERIFY(obj->status() == QSGBorderImage::Loading); + QTRY_VERIFY(obj->status() == QQuickBorderImage::Loading); QCOMPARE(obj->source(), remote ? source : QUrl(source)); if (error.isEmpty()) { - QTRY_VERIFY(obj->status() == QSGBorderImage::Ready); + QTRY_VERIFY(obj->status() == QQuickBorderImage::Ready); QCOMPARE(obj->width(), 120.); QCOMPARE(obj->height(), 120.); QCOMPARE(obj->sourceSize().width(), 120); QCOMPARE(obj->sourceSize().height(), 120); - QCOMPARE(obj->horizontalTileMode(), QSGBorderImage::Stretch); - QCOMPARE(obj->verticalTileMode(), QSGBorderImage::Stretch); + QCOMPARE(obj->horizontalTileMode(), QQuickBorderImage::Stretch); + QCOMPARE(obj->verticalTileMode(), QQuickBorderImage::Stretch); } else { - QTRY_VERIFY(obj->status() == QSGBorderImage::Error); + QTRY_VERIFY(obj->status() == QQuickBorderImage::Error); } delete obj; delete server; } -void tst_qsgborderimage::clearSource() +void tst_qquickborderimage::clearSource() { QString componentStr = "import QtQuick 2.0\nBorderImage { source: srcImage }"; QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(TESTDATA("colors.png"))); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); - QVERIFY(obj->status() == QSGBorderImage::Ready); + QVERIFY(obj->status() == QQuickBorderImage::Ready); QCOMPARE(obj->width(), 120.); QCOMPARE(obj->height(), 120.); ctxt->setContextProperty("srcImage", ""); QVERIFY(obj->source().isEmpty()); - QVERIFY(obj->status() == QSGBorderImage::Null); + QVERIFY(obj->status() == QQuickBorderImage::Null); QCOMPARE(obj->width(), 0.); QCOMPARE(obj->height(), 0.); } -void tst_qsgborderimage::resized() +void tst_qquickborderimage::resized() { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + QUrl::fromLocalFile(TESTDATA("colors.png")).toString() + "\"; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 300.); QCOMPARE(obj->sourceSize().width(), 120); QCOMPARE(obj->sourceSize().height(), 120); - QCOMPARE(obj->horizontalTileMode(), QSGBorderImage::Stretch); - QCOMPARE(obj->verticalTileMode(), QSGBorderImage::Stretch); + QCOMPARE(obj->horizontalTileMode(), QQuickBorderImage::Stretch); + QCOMPARE(obj->verticalTileMode(), QQuickBorderImage::Stretch); delete obj; } -void tst_qsgborderimage::smooth() +void tst_qquickborderimage::smooth() { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + TESTDATA("colors.png") + "\"; smooth: true; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 300.); QCOMPARE(obj->smooth(), true); - QCOMPARE(obj->horizontalTileMode(), QSGBorderImage::Stretch); - QCOMPARE(obj->verticalTileMode(), QSGBorderImage::Stretch); + QCOMPARE(obj->horizontalTileMode(), QQuickBorderImage::Stretch); + QCOMPARE(obj->verticalTileMode(), QQuickBorderImage::Stretch); delete obj; } -void tst_qsgborderimage::mirror() +void tst_qquickborderimage::mirror() { - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->show(); canvas->setSource(QUrl::fromLocalFile(TESTDATA("mirror.qml"))); - QSGBorderImage *image = qobject_cast<QSGBorderImage*>(canvas->rootObject()); + QQuickBorderImage *image = qobject_cast<QQuickBorderImage*>(canvas->rootObject()); QVERIFY(image != 0); canvas->show(); @@ -241,18 +241,18 @@ void tst_qsgborderimage::mirror() delete canvas; } -void tst_qsgborderimage::tileModes() +void tst_qquickborderimage::tileModes() { { QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + TESTDATA("colors.png") + "\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 100.); QCOMPARE(obj->height(), 300.); - QCOMPARE(obj->horizontalTileMode(), QSGBorderImage::Repeat); - QCOMPARE(obj->verticalTileMode(), QSGBorderImage::Repeat); + QCOMPARE(obj->horizontalTileMode(), QQuickBorderImage::Repeat); + QCOMPARE(obj->verticalTileMode(), QQuickBorderImage::Repeat); delete obj; } @@ -260,18 +260,18 @@ void tst_qsgborderimage::tileModes() QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + TESTDATA("colors.png") + "\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 150.); - QCOMPARE(obj->horizontalTileMode(), QSGBorderImage::Round); - QCOMPARE(obj->verticalTileMode(), QSGBorderImage::Round); + QCOMPARE(obj->horizontalTileMode(), QQuickBorderImage::Round); + QCOMPARE(obj->verticalTileMode(), QQuickBorderImage::Round); delete obj; } } -void tst_qsgborderimage::sciSource() +void tst_qquickborderimage::sciSource() { QFETCH(QString, source); QFETCH(bool, valid); @@ -287,33 +287,33 @@ void tst_qsgborderimage::sciSource() QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); if (remote) - QTRY_VERIFY(obj->status() == QSGBorderImage::Loading); + QTRY_VERIFY(obj->status() == QQuickBorderImage::Loading); QCOMPARE(obj->source(), remote ? source : QUrl(source)); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 300.); if (valid) { - QTRY_VERIFY(obj->status() == QSGBorderImage::Ready); + QTRY_VERIFY(obj->status() == QQuickBorderImage::Ready); QCOMPARE(obj->border()->left(), 10); QCOMPARE(obj->border()->top(), 20); QCOMPARE(obj->border()->right(), 30); QCOMPARE(obj->border()->bottom(), 40); - QCOMPARE(obj->horizontalTileMode(), QSGBorderImage::Round); - QCOMPARE(obj->verticalTileMode(), QSGBorderImage::Repeat); + QCOMPARE(obj->horizontalTileMode(), QQuickBorderImage::Round); + QCOMPARE(obj->verticalTileMode(), QQuickBorderImage::Repeat); } else { - QTRY_VERIFY(obj->status() == QSGBorderImage::Error); + QTRY_VERIFY(obj->status() == QQuickBorderImage::Error); } delete obj; delete server; } -void tst_qsgborderimage::sciSource_data() +void tst_qquickborderimage::sciSource_data() { QTest::addColumn<QString>("source"); QTest::addColumn<bool>("valid"); @@ -327,35 +327,35 @@ void tst_qsgborderimage::sciSource_data() QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.sci" << false; } -void tst_qsgborderimage::invalidSciFile() +void tst_qquickborderimage::invalidSciFile() { - QTest::ignoreMessage(QtWarningMsg, "QSGGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Roun" - QTest::ignoreMessage(QtWarningMsg, "QSGGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Repea" + QTest::ignoreMessage(QtWarningMsg, "QQuickGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Roun" + QTest::ignoreMessage(QtWarningMsg, "QQuickGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Repea" QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + QUrl::fromLocalFile(TESTDATA("invalid.sci")).toString() +"\"; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 300.); - QCOMPARE(obj->status(), QSGImageBase::Error); - QCOMPARE(obj->horizontalTileMode(), QSGBorderImage::Stretch); - QCOMPARE(obj->verticalTileMode(), QSGBorderImage::Stretch); + QCOMPARE(obj->status(), QQuickImageBase::Error); + QCOMPARE(obj->horizontalTileMode(), QQuickBorderImage::Stretch); + QCOMPARE(obj->verticalTileMode(), QQuickBorderImage::Stretch); delete obj; } -void tst_qsgborderimage::pendingRemoteRequest() +void tst_qquickborderimage::pendingRemoteRequest() { QFETCH(QString, source); QString componentStr = "import QtQuick 2.0\nBorderImage { source: \"" + source + "\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGBorderImage *obj = qobject_cast<QSGBorderImage*>(component.create()); + QQuickBorderImage *obj = qobject_cast<QQuickBorderImage*>(component.create()); QVERIFY(obj != 0); - QCOMPARE(obj->status(), QSGBorderImage::Loading); + QCOMPARE(obj->status(), QQuickBorderImage::Loading); // verify no crash // This will cause a delayed "QThread: Destroyed while thread is still running" warning @@ -363,7 +363,7 @@ void tst_qsgborderimage::pendingRemoteRequest() QTest::qWait(50); } -void tst_qsgborderimage::pendingRemoteRequest_data() +void tst_qquickborderimage::pendingRemoteRequest_data() { QTest::addColumn<QString>("source"); @@ -371,6 +371,6 @@ void tst_qsgborderimage::pendingRemoteRequest_data() QTest::newRow("sci file") << "http://localhost/none.sci"; } -QTEST_MAIN(tst_qsgborderimage) +QTEST_MAIN(tst_qquickborderimage) -#include "tst_qsgborderimage.moc" +#include "tst_qquickborderimage.moc" diff --git a/tests/auto/declarative/qsgcanvas/qsgcanvas.pro b/tests/auto/declarative/qquickcanvas/qquickcanvas.pro index d8749112d5..b45a3597d4 100644 --- a/tests/auto/declarative/qsgcanvas/qsgcanvas.pro +++ b/tests/auto/declarative/qquickcanvas/qquickcanvas.pro @@ -1,6 +1,6 @@ CONFIG += testcase -TARGET = tst_qsgcanvas -SOURCES += tst_qsgcanvas.cpp +TARGET = tst_qquickcanvas +SOURCES += tst_qquickcanvas.cpp macx:CONFIG -= app_bundle diff --git a/tests/auto/declarative/qsgcanvas/tst_qsgcanvas.cpp b/tests/auto/declarative/qquickcanvas/tst_qquickcanvas.cpp index d8135ed233..d2b691d461 100644 --- a/tests/auto/declarative/qsgcanvas/tst_qsgcanvas.cpp +++ b/tests/auto/declarative/qquickcanvas/tst_qquickcanvas.cpp @@ -42,9 +42,9 @@ #include <qtest.h> #include <QDebug> #include <QTouchEvent> -#include <QtDeclarative/QSGItem> -#include <QtDeclarative/QSGCanvas> -#include <QtDeclarative/private/qsgrectangle_p.h> +#include <QtDeclarative/QQuickItem> +#include <QtDeclarative/QQuickCanvas> +#include <QtDeclarative/private/qquickrectangle_p.h> #include <QtGui/QWindowSystemInterface> struct TouchEventData { @@ -55,7 +55,7 @@ struct TouchEventData { QList<QTouchEvent::TouchPoint> touchPoints; }; -static QTouchEvent::TouchPoint makeTouchPoint(QSGItem *item, const QPointF &p, const QPointF &lastPoint = QPointF()) +static QTouchEvent::TouchPoint makeTouchPoint(QQuickItem *item, const QPointF &p, const QPointF &lastPoint = QPointF()) { QPointF last = lastPoint.isNull() ? p : lastPoint; @@ -115,12 +115,12 @@ static TouchEventData makeTouchData(QEvent::Type type, QWindow *w, Qt::TouchPoin } \ } -class TestTouchItem : public QSGRectangle +class TestTouchItem : public QQuickRectangle { Q_OBJECT public: - TestTouchItem(QSGItem *parent = 0) - : QSGRectangle(parent), acceptEvents(true), mousePressId(0) + TestTouchItem(QQuickItem *parent = 0) + : QQuickRectangle(parent), acceptEvents(true), mousePressId(0) { border()->setWidth(1); setAcceptedMouseButtons(Qt::LeftButton); @@ -153,7 +153,7 @@ protected: mousePressId = ++mousePressNum; } - bool childMouseEventFilter(QSGItem *, QEvent *) { + bool childMouseEventFilter(QQuickItem *, QEvent *) { mousePressId = ++mousePressNum; return false; } @@ -163,11 +163,11 @@ protected: int TestTouchItem::mousePressNum = 0; -class ConstantUpdateItem : public QSGItem +class ConstantUpdateItem : public QQuickItem { Q_OBJECT public: - ConstantUpdateItem(QSGItem *parent = 0) : QSGItem(parent), iterations(0) {setFlag(ItemHasContents);} + ConstantUpdateItem(QQuickItem *parent = 0) : QQuickItem(parent), iterations(0) {setFlag(ItemHasContents);} int iterations; protected: @@ -178,11 +178,11 @@ protected: } }; -class tst_qsgcanvas : public QObject +class tst_qquickcanvas : public QObject { Q_OBJECT public: - tst_qsgcanvas(); + tst_qquickcanvas(); private slots: void initTestCase(); @@ -198,30 +198,30 @@ private slots: void mouseFiltering(); }; -tst_qsgcanvas::tst_qsgcanvas() +tst_qquickcanvas::tst_qquickcanvas() { } -void tst_qsgcanvas::initTestCase() +void tst_qquickcanvas::initTestCase() { } -void tst_qsgcanvas::cleanupTestCase() +void tst_qquickcanvas::cleanupTestCase() { } //If the item calls update inside updatePaintNode, it should schedule another update -void tst_qsgcanvas::constantUpdates() +void tst_qquickcanvas::constantUpdates() { - QSGCanvas canvas; + QQuickCanvas canvas; ConstantUpdateItem item(canvas.rootItem()); canvas.show(); QTRY_VERIFY(item.iterations > 60); } -void tst_qsgcanvas::touchEvent_basic() +void tst_qquickcanvas::touchEvent_basic() { - QSGCanvas *canvas = new QSGCanvas; + QQuickCanvas *canvas = new QQuickCanvas; canvas->resize(250, 250); canvas->move(100, 100); canvas->show(); @@ -334,13 +334,13 @@ void tst_qsgcanvas::touchEvent_basic() delete canvas; } -void tst_qsgcanvas::touchEvent_propagation() +void tst_qquickcanvas::touchEvent_propagation() { QFETCH(bool, acceptEvents); QFETCH(bool, enableItem); QFETCH(qreal, itemOpacity); - QSGCanvas *canvas = new QSGCanvas; + QQuickCanvas *canvas = new QQuickCanvas; canvas->resize(250, 250); canvas->move(100, 100); canvas->show(); @@ -453,7 +453,7 @@ void tst_qsgcanvas::touchEvent_propagation() delete canvas; } -void tst_qsgcanvas::touchEvent_propagation_data() +void tst_qquickcanvas::touchEvent_propagation_data() { QTest::addColumn<bool>("acceptEvents"); QTest::addColumn<bool>("enableItem"); @@ -464,10 +464,10 @@ void tst_qsgcanvas::touchEvent_propagation_data() QTest::newRow("opacity of 0") << true << true << 0.0; } -void tst_qsgcanvas::clearCanvas() +void tst_qquickcanvas::clearCanvas() { - QSGCanvas *canvas = new QSGCanvas; - QSGItem *item = new QSGItem; + QQuickCanvas *canvas = new QQuickCanvas; + QQuickItem *item = new QQuickItem; item->setParentItem(canvas->rootItem()); QVERIFY(item->canvas() == canvas); @@ -479,9 +479,9 @@ void tst_qsgcanvas::clearCanvas() delete item; } -void tst_qsgcanvas::mouseFiltering() +void tst_qquickcanvas::mouseFiltering() { - QSGCanvas *canvas = new QSGCanvas; + QQuickCanvas *canvas = new QQuickCanvas; canvas->resize(250, 250); canvas->move(100, 100); canvas->show(); @@ -516,6 +516,6 @@ void tst_qsgcanvas::mouseFiltering() } -QTEST_MAIN(tst_qsgcanvas) +QTEST_MAIN(tst_qquickcanvas) -#include "tst_qsgcanvas.moc" +#include "tst_qquickcanvas.moc" diff --git a/tests/auto/declarative/qsgcanvasitem/data/anim-gr.gif b/tests/auto/declarative/qquickcanvasitem/data/anim-gr.gif Binary files differindex 45263e0afb..45263e0afb 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/anim-gr.gif +++ b/tests/auto/declarative/qquickcanvasitem/data/anim-gr.gif diff --git a/tests/auto/declarative/qsgcanvasitem/data/anim-gr.png b/tests/auto/declarative/qquickcanvasitem/data/anim-gr.png Binary files differindex 925e2efc9a..925e2efc9a 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/anim-gr.png +++ b/tests/auto/declarative/qquickcanvasitem/data/anim-gr.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/anim-poster-gr.png b/tests/auto/declarative/qquickcanvasitem/data/anim-poster-gr.png Binary files differindex 6941207373..6941207373 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/anim-poster-gr.png +++ b/tests/auto/declarative/qquickcanvasitem/data/anim-poster-gr.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/background.png b/tests/auto/declarative/qquickcanvasitem/data/background.png Binary files differindex 6db6c6b1b9..6db6c6b1b9 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/background.png +++ b/tests/auto/declarative/qquickcanvasitem/data/background.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/broken.png b/tests/auto/declarative/qquickcanvasitem/data/broken.png Binary files differindex f2581017b4..f2581017b4 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/broken.png +++ b/tests/auto/declarative/qquickcanvasitem/data/broken.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/ggrr-256x256.png b/tests/auto/declarative/qquickcanvasitem/data/ggrr-256x256.png Binary files differindex 0342e4a384..0342e4a384 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/ggrr-256x256.png +++ b/tests/auto/declarative/qquickcanvasitem/data/ggrr-256x256.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/green-16x16.png b/tests/auto/declarative/qquickcanvasitem/data/green-16x16.png Binary files differindex e19a3ffddd..e19a3ffddd 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/green-16x16.png +++ b/tests/auto/declarative/qquickcanvasitem/data/green-16x16.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/green-1x1.png b/tests/auto/declarative/qquickcanvasitem/data/green-1x1.png Binary files differindex 862d1dd10c..862d1dd10c 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/green-1x1.png +++ b/tests/auto/declarative/qquickcanvasitem/data/green-1x1.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/green-256x256.png b/tests/auto/declarative/qquickcanvasitem/data/green-256x256.png Binary files differindex b06945c310..b06945c310 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/green-256x256.png +++ b/tests/auto/declarative/qquickcanvasitem/data/green-256x256.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/green-2x2.png b/tests/auto/declarative/qquickcanvasitem/data/green-2x2.png Binary files differindex adc059449c..adc059449c 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/green-2x2.png +++ b/tests/auto/declarative/qquickcanvasitem/data/green-2x2.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/green.png b/tests/auto/declarative/qquickcanvasitem/data/green.png Binary files differindex 28a1faab37..28a1faab37 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/green.png +++ b/tests/auto/declarative/qquickcanvasitem/data/green.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/grgr-256x256.png b/tests/auto/declarative/qquickcanvasitem/data/grgr-256x256.png Binary files differindex b8c7189d62..b8c7189d62 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/grgr-256x256.png +++ b/tests/auto/declarative/qquickcanvasitem/data/grgr-256x256.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/red-16x16.png b/tests/auto/declarative/qquickcanvasitem/data/red-16x16.png Binary files differindex 9038fef784..9038fef784 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/red-16x16.png +++ b/tests/auto/declarative/qquickcanvasitem/data/red-16x16.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/red.png b/tests/auto/declarative/qquickcanvasitem/data/red.png Binary files differindex a6e195d59c..a6e195d59c 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/red.png +++ b/tests/auto/declarative/qquickcanvasitem/data/red.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/redtransparent.png b/tests/auto/declarative/qquickcanvasitem/data/redtransparent.png Binary files differindex 75da08c3d6..75da08c3d6 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/redtransparent.png +++ b/tests/auto/declarative/qquickcanvasitem/data/redtransparent.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/rgrg-256x256.png b/tests/auto/declarative/qquickcanvasitem/data/rgrg-256x256.png Binary files differindex e6fba3daa5..e6fba3daa5 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/rgrg-256x256.png +++ b/tests/auto/declarative/qquickcanvasitem/data/rgrg-256x256.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/rrgg-256x256.png b/tests/auto/declarative/qquickcanvasitem/data/rrgg-256x256.png Binary files differindex 7f63515654..7f63515654 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/rrgg-256x256.png +++ b/tests/auto/declarative/qquickcanvasitem/data/rrgg-256x256.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/testhelper.js b/tests/auto/declarative/qquickcanvasitem/data/testhelper.js index bac0210e16..bac0210e16 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/testhelper.js +++ b/tests/auto/declarative/qquickcanvasitem/data/testhelper.js diff --git a/tests/auto/declarative/qsgcanvasitem/data/transparent.png b/tests/auto/declarative/qquickcanvasitem/data/transparent.png Binary files differindex 2b498699a8..2b498699a8 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/transparent.png +++ b/tests/auto/declarative/qquickcanvasitem/data/transparent.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/transparent50.png b/tests/auto/declarative/qquickcanvasitem/data/transparent50.png Binary files differindex 55f8e69325..55f8e69325 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/transparent50.png +++ b/tests/auto/declarative/qquickcanvasitem/data/transparent50.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_arc.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_arc.qml index 6006a5a4c0..6006a5a4c0 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_arc.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_arc.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_arcto.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_arcto.qml index cc1d88672b..cc1d88672b 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_arcto.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_arcto.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_canvas.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_canvas.qml index 70bedb2131..70bedb2131 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_canvas.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_canvas.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_composite.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_composite.qml index 11e1dce902..11e1dce902 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_composite.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_composite.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_drawimage.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_drawimage.qml index 3752f528be..3752f528be 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_drawimage.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_drawimage.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_fillStyle.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_fillStyle.qml index 8f5a78cec0..8f5a78cec0 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_fillStyle.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_fillStyle.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_fillrect.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_fillrect.qml index 2061647268..2061647268 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_fillrect.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_fillrect.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_gradient.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_gradient.qml index d454c2efe1..d454c2efe1 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_gradient.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_gradient.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_line.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_line.qml index baf9987ce3..baf9987ce3 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_line.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_line.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_path.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_path.qml index b04ccf5458..b04ccf5458 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_path.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_path.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_pattern.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_pattern.qml index dd5b6628e8..dd5b6628e8 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_pattern.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_pattern.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_pixel.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_pixel.qml index 1a3793d7a3..1a3793d7a3 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_pixel.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_pixel.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_shadow.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_shadow.qml index 4405ca6c0e..4405ca6c0e 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_shadow.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_shadow.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_state.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_state.qml index 8042cf6a1d..8042cf6a1d 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_state.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_state.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_strokeStyle.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_strokeStyle.qml index 6b42f8a770..6b42f8a770 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_strokeStyle.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_strokeStyle.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_text.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_text.qml index baeb17c9fb..baeb17c9fb 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_text.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_text.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/tst_transform.qml b/tests/auto/declarative/qquickcanvasitem/data/tst_transform.qml index 834a22f549..834a22f549 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/tst_transform.qml +++ b/tests/auto/declarative/qquickcanvasitem/data/tst_transform.qml diff --git a/tests/auto/declarative/qsgcanvasitem/data/yellow.png b/tests/auto/declarative/qquickcanvasitem/data/yellow.png Binary files differindex 51e8aaf38c..51e8aaf38c 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/yellow.png +++ b/tests/auto/declarative/qquickcanvasitem/data/yellow.png diff --git a/tests/auto/declarative/qsgcanvasitem/data/yellow75.png b/tests/auto/declarative/qquickcanvasitem/data/yellow75.png Binary files differindex 2bb82c9834..2bb82c9834 100644 --- a/tests/auto/declarative/qsgcanvasitem/data/yellow75.png +++ b/tests/auto/declarative/qquickcanvasitem/data/yellow75.png diff --git a/tests/auto/declarative/qsgcanvasitem/qsgcanvasitem.pro b/tests/auto/declarative/qquickcanvasitem/qquickcanvasitem.pro index 18c1ea6d4a..269aabbbac 100644 --- a/tests/auto/declarative/qsgcanvasitem/qsgcanvasitem.pro +++ b/tests/auto/declarative/qquickcanvasitem/qquickcanvasitem.pro @@ -1,10 +1,10 @@ QT += core-private gui-private declarative-private widgets TEMPLATE=app -TARGET=tst_qsgcanvasitem +TARGET=tst_qquickcanvasitem CONFIG+=insignificant_test CONFIG += warn_on qmltestcase -SOURCES += tst_qsgcanvasitem.cpp +SOURCES += tst_qquickcanvasitem.cpp importFiles.files = data importFiles.path = . diff --git a/tests/auto/declarative/qsgcanvasitem/tst_qsgcanvasitem.cpp b/tests/auto/declarative/qquickcanvasitem/tst_qquickcanvasitem.cpp index 680e45238e..57195babb7 100644 --- a/tests/auto/declarative/qsgcanvasitem/tst_qsgcanvasitem.cpp +++ b/tests/auto/declarative/qquickcanvasitem/tst_qquickcanvasitem.cpp @@ -39,4 +39,4 @@ ** ****************************************************************************/ #include <QtQuickTest/quicktest.h> -QUICK_TEST_MAIN(qsgcanvasitem) +QUICK_TEST_MAIN(qquickcanvasitem) diff --git a/tests/auto/declarative/qsgdrag/qsgdrag.pro b/tests/auto/declarative/qquickdrag/qquickdrag.pro index a799860be9..416ecdbe8e 100644 --- a/tests/auto/declarative/qsgdrag/qsgdrag.pro +++ b/tests/auto/declarative/qquickdrag/qquickdrag.pro @@ -1,8 +1,8 @@ -TARGET = tst_qsgdrag +TARGET = tst_qquickdrag CONFIG += testcase macx:CONFIG -= app_bundle -SOURCES += tst_qsgdrag.cpp +SOURCES += tst_qquickdrag.cpp CONFIG += parallel_test diff --git a/tests/auto/declarative/qsgdrag/tst_qsgdrag.cpp b/tests/auto/declarative/qquickdrag/tst_qquickdrag.cpp index 9719114662..6bc0866a6e 100644 --- a/tests/auto/declarative/qsgdrag/tst_qsgdrag.cpp +++ b/tests/auto/declarative/qquickdrag/tst_qquickdrag.cpp @@ -41,8 +41,8 @@ #include <QtTest/QtTest> #include <QtTest/QSignalSpy> -#include <QtDeclarative/qsgitem.h> -#include <QtDeclarative/qsgview.h> +#include <QtDeclarative/qquickitem.h> +#include <QtDeclarative/qquickview.h> #include <QtDeclarative/qdeclarativecontext.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativeexpression.h> @@ -66,12 +66,12 @@ template <> void evaluate<void>(QObject *scope, const QString &expression) Q_DECLARE_METATYPE(Qt::DropActions) -class TestDropTarget : public QSGItem +class TestDropTarget : public QQuickItem { Q_OBJECT public: - TestDropTarget(QSGItem *parent = 0) - : QSGItem(parent) + TestDropTarget(QQuickItem *parent = 0) + : QQuickItem(parent) , enterEvents(0) , moveEvents(0) , leaveEvents(0) @@ -144,7 +144,7 @@ public: bool accept; }; -class tst_QSGDrag: public QObject +class tst_QQuickDrag: public QObject { Q_OBJECT private slots: @@ -164,19 +164,19 @@ private: QDeclarativeEngine engine; }; -void tst_QSGDrag::initTestCase() +void tst_QQuickDrag::initTestCase() { } -void tst_QSGDrag::cleanupTestCase() +void tst_QQuickDrag::cleanupTestCase() { } -void tst_QSGDrag::active() +void tst_QQuickDrag::active() { - QSGCanvas canvas; + QQuickCanvas canvas; TestDropTarget dropTarget(canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); QDeclarativeComponent component(&engine); @@ -189,7 +189,7 @@ void tst_QSGDrag::active() "width: 10; height: 10\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *item = qobject_cast<QSGItem *>(object.data()); + QQuickItem *item = qobject_cast<QQuickItem *>(object.data()); QVERIFY(item); item->setParentItem(&dropTarget); @@ -244,8 +244,8 @@ void tst_QSGDrag::active() QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(0)); QCOMPARE(dropTarget.enterEvents, 0); QCOMPARE(dropTarget.leaveEvents, 1); - // Enter events aren't sent to items without the QSGItem::ItemAcceptsDrops flag. - dropTarget.setFlags(QSGItem::Flags()); + // Enter events aren't sent to items without the QQuickItem::ItemAcceptsDrops flag. + dropTarget.setFlags(QQuickItem::Flags()); dropTarget.reset(); evaluate<void>(item, "Drag.active = true"); @@ -263,7 +263,7 @@ void tst_QSGDrag::active() QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(0)); QCOMPARE(dropTarget.enterEvents, 0); QCOMPARE(dropTarget.leaveEvents, 0); - dropTarget.setFlags(QSGItem::ItemAcceptsDrops); + dropTarget.setFlags(QQuickItem::ItemAcceptsDrops); dropTarget.reset(); evaluate<void>(item, "Drag.active = true"); @@ -273,7 +273,7 @@ void tst_QSGDrag::active() QCOMPARE(evaluate<QObject *>(item, "dragTarget"), static_cast<QObject *>(&dropTarget)); QCOMPARE(dropTarget.enterEvents, 1); QCOMPARE(dropTarget.leaveEvents, 0); - dropTarget.setFlags(QSGItem::Flags()); + dropTarget.setFlags(QQuickItem::Flags()); dropTarget.reset(); evaluate<void>(item, "Drag.active = false"); @@ -284,7 +284,7 @@ void tst_QSGDrag::active() QCOMPARE(dropTarget.enterEvents, 0); QCOMPARE(dropTarget.leaveEvents, 1); // Follow up events aren't sent to items if the enter event isn't accepted. - dropTarget.setFlags(QSGItem::ItemAcceptsDrops); + dropTarget.setFlags(QQuickItem::ItemAcceptsDrops); dropTarget.accept = false; dropTarget.reset(); @@ -359,9 +359,9 @@ void tst_QSGDrag::active() QCOMPARE(dropTarget.enterEvents, 0); QCOMPARE(dropTarget.leaveEvents, 0); } -void tst_QSGDrag::drop() +void tst_QQuickDrag::drop() { - QSGCanvas canvas; + QQuickCanvas canvas; TestDropTarget outerTarget(canvas.rootItem()); outerTarget.setSize(QSizeF(100, 100)); outerTarget.acceptAction = Qt::CopyAction; @@ -378,7 +378,7 @@ void tst_QSGDrag::drop() "width: 10; height: 10\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *item = qobject_cast<QSGItem *>(object.data()); + QQuickItem *item = qobject_cast<QQuickItem *>(object.data()); QVERIFY(item); item->setParentItem(&outerTarget); @@ -424,7 +424,7 @@ void tst_QSGDrag::drop() // Inner target doesn't accept enter so drop goes directly to outer. innerTarget.accept = true; - innerTarget.setFlags(QSGItem::Flags()); + innerTarget.setFlags(QQuickItem::Flags()); innerTarget.reset(); outerTarget.reset(); evaluate<void>(item, "Drag.active = true"); @@ -478,9 +478,9 @@ void tst_QSGDrag::drop() QCOMPARE(innerTarget.enterEvents, 0); QCOMPARE(innerTarget.leaveEvents, 0); QCOMPARE(innerTarget.dropEvents, 0); } -void tst_QSGDrag::move() +void tst_QQuickDrag::move() { - QSGCanvas canvas; + QQuickCanvas canvas; TestDropTarget outerTarget(canvas.rootItem()); outerTarget.setSize(QSizeF(100, 100)); TestDropTarget leftTarget(&outerTarget); @@ -499,7 +499,7 @@ void tst_QSGDrag::move() "width: 10; height: 10\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *item = qobject_cast<QSGItem *>(object.data()); + QQuickItem *item = qobject_cast<QQuickItem *>(object.data()); QVERIFY(item); item->setParentItem(&outerTarget); @@ -589,8 +589,8 @@ void tst_QSGDrag::move() QCOMPARE(rightTarget.enterEvents, 0); QCOMPARE(rightTarget.leaveEvents, 0); QCOMPARE(rightTarget.moveEvents, 0); QCOMPARE(outerTarget.position.x(), qreal(60)); QCOMPARE(outerTarget.position.y(), qreal(50)); - // Clear the QSGItem::ItemAcceptsDrops flag from the outer target after it accepted an enter event. - outerTarget.setFlags(QSGItem::Flags()); + // Clear the QQuickItem::ItemAcceptsDrops flag from the outer target after it accepted an enter event. + outerTarget.setFlags(QQuickItem::Flags()); outerTarget.reset(); leftTarget.reset(); rightTarget.reset(); item->setPos(QPointF(40, 50)); @@ -601,8 +601,8 @@ void tst_QSGDrag::move() QCOMPARE(rightTarget.enterEvents, 0); QCOMPARE(rightTarget.leaveEvents, 0); QCOMPARE(rightTarget.moveEvents, 0); QCOMPARE(outerTarget.position.x(), qreal(40)); QCOMPARE(outerTarget.position.y(), qreal(50)); - // Clear the QSGItem::ItemAcceptsDrops flag from the left target before it accepts an enter event. - leftTarget.setFlags(QSGItem::Flags()); + // Clear the QQuickItem::ItemAcceptsDrops flag from the left target before it accepts an enter event. + leftTarget.setFlags(QQuickItem::Flags()); outerTarget.reset(); leftTarget.reset(); rightTarget.reset(); item->setPos(QPointF(25, 50)); @@ -615,9 +615,9 @@ void tst_QSGDrag::move() } -void tst_QSGDrag::hotSpot() +void tst_QQuickDrag::hotSpot() { - QSGCanvas canvas; + QQuickCanvas canvas; TestDropTarget dropTarget(canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); QDeclarativeComponent component(&engine); @@ -630,7 +630,7 @@ void tst_QSGDrag::hotSpot() "width: 10; height: 10\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *item = qobject_cast<QSGItem *>(object.data()); + QQuickItem *item = qobject_cast<QQuickItem *>(object.data()); QVERIFY(item); item->setParentItem(&dropTarget); @@ -671,9 +671,9 @@ void tst_QSGDrag::hotSpot() QCOMPARE(dropTarget.position.y(), qreal(30)); } -void tst_QSGDrag::supportedActions() +void tst_QQuickDrag::supportedActions() { - QSGCanvas canvas; + QQuickCanvas canvas; TestDropTarget dropTarget(canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); QDeclarativeComponent component(&engine); @@ -685,7 +685,7 @@ void tst_QSGDrag::supportedActions() "width: 10; height: 10\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *item = qobject_cast<QSGItem *>(object.data()); + QQuickItem *item = qobject_cast<QQuickItem *>(object.data()); QVERIFY(item); item->setParentItem(&dropTarget); @@ -719,9 +719,9 @@ void tst_QSGDrag::supportedActions() QCOMPARE(dropTarget.supportedActions, Qt::MoveAction); } -void tst_QSGDrag::proposedAction() +void tst_QQuickDrag::proposedAction() { - QSGCanvas canvas; + QQuickCanvas canvas; TestDropTarget dropTarget(canvas.rootItem()); dropTarget.setSize(QSizeF(100, 100)); QDeclarativeComponent component(&engine); @@ -733,7 +733,7 @@ void tst_QSGDrag::proposedAction() "width: 10; height: 10\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *item = qobject_cast<QSGItem *>(object.data()); + QQuickItem *item = qobject_cast<QQuickItem *>(object.data()); QVERIFY(item); item->setParentItem(&dropTarget); @@ -767,7 +767,7 @@ void tst_QSGDrag::proposedAction() QCOMPARE(dropTarget.proposedAction, Qt::LinkAction); } -void tst_QSGDrag::keys() +void tst_QQuickDrag::keys() { QDeclarativeComponent component(&engine); component.setData( @@ -778,7 +778,7 @@ void tst_QSGDrag::keys() "width: 10; height: 10\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *item = qobject_cast<QSGItem *>(object.data()); + QQuickItem *item = qobject_cast<QQuickItem *>(object.data()); QVERIFY(item); // QCOMPARE(evaluate<QStringList>(item, "Drag.keys"), QStringList()); @@ -791,7 +791,7 @@ void tst_QSGDrag::keys() QCOMPARE(item->property("keys").toStringList(), QStringList() << "red" << "blue"); } -void tst_QSGDrag::source() +void tst_QQuickDrag::source() { QDeclarativeComponent component(&engine); @@ -804,13 +804,13 @@ void tst_QSGDrag::source() "Item { id: proxySource; objectName: \"proxySource\" }\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *item = qobject_cast<QSGItem *>(object.data()); + QQuickItem *item = qobject_cast<QQuickItem *>(object.data()); QVERIFY(item); QCOMPARE(evaluate<QObject *>(item, "Drag.source"), static_cast<QObject *>(item)); QCOMPARE(evaluate<QObject *>(item, "source"), static_cast<QObject *>(item)); - QSGItem *proxySource = item->findChild<QSGItem *>("proxySource"); + QQuickItem *proxySource = item->findChild<QQuickItem *>("proxySource"); QVERIFY(proxySource); evaluate<void>(item, "Drag.source = proxySource"); @@ -822,6 +822,6 @@ void tst_QSGDrag::source() QCOMPARE(evaluate<QObject *>(item, "source"), static_cast<QObject *>(item)); } -QTEST_MAIN(tst_QSGDrag) +QTEST_MAIN(tst_QQuickDrag) -#include "tst_qsgdrag.moc" +#include "tst_qquickdrag.moc" diff --git a/tests/auto/declarative/qsgdroparea/qsgdroparea.pro b/tests/auto/declarative/qquickdroparea/qquickdroparea.pro index f07071f9dc..eff08a2e94 100644 --- a/tests/auto/declarative/qsgdroparea/qsgdroparea.pro +++ b/tests/auto/declarative/qquickdroparea/qquickdroparea.pro @@ -1,8 +1,8 @@ -TARGET = tst_qsgdroparea +TARGET = tst_qquickdroparea CONFIG += testcase macx:CONFIG -= app_bundle -SOURCES += tst_qsgdroparea.cpp +SOURCES += tst_qquickdroparea.cpp CONFIG += parallel_test diff --git a/tests/auto/declarative/qsgdroparea/tst_qsgdroparea.cpp b/tests/auto/declarative/qquickdroparea/tst_qquickdroparea.cpp index 1c303b4b3e..0147536abf 100644 --- a/tests/auto/declarative/qsgdroparea/tst_qsgdroparea.cpp +++ b/tests/auto/declarative/qquickdroparea/tst_qquickdroparea.cpp @@ -41,8 +41,8 @@ #include <QtTest/QtTest> #include <QtTest/QSignalSpy> -#include <QtDeclarative/qsgitem.h> -#include <QtDeclarative/qsgview.h> +#include <QtDeclarative/qquickitem.h> +#include <QtDeclarative/qquickview.h> #include <QtDeclarative/qdeclarativecontext.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativeexpression.h> @@ -66,7 +66,7 @@ template <> void evaluate<void>(QObject *scope, const QString &expression) qWarning() << expr.error().toString(); } -class tst_QSGDropArea: public QObject +class tst_QQuickDropArea: public QObject { Q_OBJECT private slots: @@ -89,19 +89,19 @@ private: QDeclarativeEngine engine; }; -void tst_QSGDropArea::initTestCase() +void tst_QQuickDropArea::initTestCase() { } -void tst_QSGDropArea::cleanupTestCase() +void tst_QQuickDropArea::cleanupTestCase() { } -void tst_QSGDropArea::containsDrag_internal() +void tst_QQuickDropArea::containsDrag_internal() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -119,11 +119,11 @@ void tst_QSGDropArea::containsDrag_internal() "}\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea = qobject_cast<QQuickItem *>(object.data()); QVERIFY(dropArea); dropArea->setParentItem(canvas.rootItem()); - QSGItem *dragItem = dropArea->findChild<QSGItem *>("dragItem"); + QQuickItem *dragItem = dropArea->findChild<QQuickItem *>("dragItem"); QVERIFY(dragItem); QCOMPARE(evaluate<bool>(dropArea, "containsDrag"), false); @@ -168,9 +168,9 @@ void tst_QSGDropArea::containsDrag_internal() evaluate<void>(dragItem, "Drag.active = false"); } -void tst_QSGDropArea::containsDrag_external() +void tst_QQuickDropArea::containsDrag_external() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -183,11 +183,12 @@ void tst_QSGDropArea::containsDrag_external() "onExited: {++exitEvents}\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea = qobject_cast<QQuickItem *>(object.data()); + QVERIFY(dropArea); dropArea->setParentItem(canvas.rootItem()); QMimeData data; - QSGCanvas alternateCanvas; + QQuickCanvas alternateCanvas; QCOMPARE(evaluate<bool>(dropArea, "containsDrag"), false); QCOMPARE(evaluate<bool>(dropArea, "hasDrag"), false); @@ -230,9 +231,9 @@ void tst_QSGDropArea::containsDrag_external() QWindowSystemInterface::handleDrop(&canvas, &data, QPoint(150, 50)); } -void tst_QSGDropArea::keys_internal() +void tst_QQuickDropArea::keys_internal() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -250,10 +251,11 @@ void tst_QSGDropArea::keys_internal() "}\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea = qobject_cast<QQuickItem *>(object.data()); + QVERIFY(dropArea); dropArea->setParentItem(canvas.rootItem()); - QSGItem *dragItem = dropArea->findChild<QSGItem *>("dragItem"); + QQuickItem *dragItem = dropArea->findChild<QQuickItem *>("dragItem"); QVERIFY(dragItem); QCOMPARE(evaluate<bool>(dropArea, "containsDrag"), false); @@ -336,9 +338,9 @@ void tst_QSGDropArea::keys_internal() QCOMPARE(dropArea->property("dragKeys").toStringList(), QStringList() << "red" << "blue"); } -void tst_QSGDropArea::keys_external() +void tst_QQuickDropArea::keys_external() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -350,11 +352,11 @@ void tst_QSGDropArea::keys_external() "onEntered: {++enterEvents; dragKeys = drag.keys }\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea = qobject_cast<QQuickItem *>(object.data()); dropArea->setParentItem(canvas.rootItem()); QMimeData data; - QSGCanvas alternateCanvas; + QQuickCanvas alternateCanvas; data.setData("text/x-red", "red"); data.setData("text/x-blue", "blue"); @@ -437,9 +439,9 @@ void tst_QSGDropArea::keys_external() QWindowSystemInterface::handleDrop(&canvas, &data, QPoint(50, 50)); } -void tst_QSGDropArea::source_internal() +void tst_QQuickDropArea::source_internal() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -456,13 +458,14 @@ void tst_QSGDropArea::source_internal() "Item { id: dragSource; objectName: \"dragSource\" }\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea = qobject_cast<QQuickItem *>(object.data()); + QVERIFY(dropArea); dropArea->setParentItem(canvas.rootItem()); - QSGItem *dragItem = dropArea->findChild<QSGItem *>("dragItem"); + QQuickItem *dragItem = dropArea->findChild<QQuickItem *>("dragItem"); QVERIFY(dragItem); - QSGItem *dragSource = dropArea->findChild<QSGItem *>("dragSource"); + QQuickItem *dragSource = dropArea->findChild<QQuickItem *>("dragSource"); QVERIFY(dragSource); QCOMPARE(evaluate<QObject *>(dropArea, "source"), static_cast<QObject *>(0)); @@ -493,13 +496,13 @@ void tst_QSGDropArea::source_internal() // Setting a source can't be emulated using the QWindowSystemInterface API. -//void tst_QSGDropArea::source_external() +//void tst_QQuickDropArea::source_external() //{ //} -void tst_QSGDropArea::position_internal() +void tst_QQuickDropArea::position_internal() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -520,10 +523,11 @@ void tst_QSGDropArea::position_internal() "}\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea = qobject_cast<QQuickItem *>(object.data()); + QVERIFY(dropArea); dropArea->setParentItem(canvas.rootItem()); - QSGItem *dragItem = dropArea->findChild<QSGItem *>("dragItem"); + QQuickItem *dragItem = dropArea->findChild<QQuickItem *>("dragItem"); QVERIFY(dragItem); evaluate<void>(dragItem, "Drag.active = true"); @@ -561,9 +565,9 @@ void tst_QSGDropArea::position_internal() evaluate<void>(dragItem, "Drag.active = false"); } -void tst_QSGDropArea::position_external() +void tst_QQuickDropArea::position_external() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -579,7 +583,8 @@ void tst_QSGDropArea::position_external() "onPositionChanged: {++moveEvents; eventX = drag.x; eventY = drag.y}\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea = qobject_cast<QQuickItem *>(object.data()); + QVERIFY(dropArea); dropArea->setParentItem(canvas.rootItem()); QMimeData data; @@ -619,9 +624,9 @@ void tst_QSGDropArea::position_external() QWindowSystemInterface::handleDrop(&canvas, &data, QPoint(75, 25)); } -void tst_QSGDropArea::drop_internal() +void tst_QQuickDropArea::drop_internal() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -655,10 +660,11 @@ void tst_QSGDropArea::drop_internal() "}\n" "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea = qobject_cast<QQuickItem *>(object.data()); + QVERIFY(dropArea); dropArea->setParentItem(canvas.rootItem()); - QSGItem *dragItem = dropArea->findChild<QSGItem *>("dragItem"); + QQuickItem *dragItem = dropArea->findChild<QQuickItem *>("dragItem"); QVERIFY(dragItem); evaluate<void>(dragItem, "Drag.active = true"); @@ -752,13 +758,13 @@ void tst_QSGDropArea::drop_internal() // Setting the supportedActions can't be emulated using the QWindowSystemInterface API. -//void tst_QSGDropArea::drop_external() +//void tst_QQuickDropArea::drop_external() //{ //} -void tst_QSGDropArea::simultaneousDrags() +void tst_QQuickDropArea::simultaneousDrags() { - QSGCanvas canvas; + QQuickCanvas canvas; QDeclarativeComponent component(&engine); component.setData( "import QtQuick 2.0\n" @@ -793,23 +799,24 @@ void tst_QSGDropArea::simultaneousDrags() "}", QUrl()); QScopedPointer<QObject> object(component.create()); - QSGItem *dropArea1 = qobject_cast<QSGItem *>(object.data()); + QQuickItem *dropArea1 = qobject_cast<QQuickItem *>(object.data()); + QVERIFY(dropArea1); dropArea1->setParentItem(canvas.rootItem()); - QSGItem *dropArea2 = dropArea1->findChild<QSGItem *>("dropArea2"); + QQuickItem *dropArea2 = dropArea1->findChild<QQuickItem *>("dropArea2"); QVERIFY(dropArea2); - QSGItem *dragItem1 = dropArea1->findChild<QSGItem *>("dragItem1"); + QQuickItem *dragItem1 = dropArea1->findChild<QQuickItem *>("dragItem1"); QVERIFY(dragItem1); - QSGItem *dragItem2 = dropArea1->findChild<QSGItem *>("dragItem2"); + QQuickItem *dragItem2 = dropArea1->findChild<QQuickItem *>("dragItem2"); QVERIFY(dragItem2); QMimeData data; data.setData("text/x-red", "red"); data.setData("text/x-blue", "blue"); - QSGCanvas alternateCanvas; + QQuickCanvas alternateCanvas; // Mixed internal drags. evaluate<void>(dropArea1, "{ enterEvents = 0; exitEvents = 0 }"); @@ -1105,6 +1112,6 @@ void tst_QSGDropArea::simultaneousDrags() QWindowSystemInterface::handleDrop(&alternateCanvas, &data, QPoint(50, 50)); } -QTEST_MAIN(tst_QSGDropArea) +QTEST_MAIN(tst_QQuickDropArea) -#include "tst_qsgdroparea.moc" +#include "tst_qquickdroparea.moc" diff --git a/tests/auto/declarative/qsgflickable/data/disabled.qml b/tests/auto/declarative/qquickflickable/data/disabled.qml index 9b679827c7..9b679827c7 100644 --- a/tests/auto/declarative/qsgflickable/data/disabled.qml +++ b/tests/auto/declarative/qquickflickable/data/disabled.qml diff --git a/tests/auto/declarative/qsgflickable/data/flickable01.qml b/tests/auto/declarative/qquickflickable/data/flickable01.qml index cbec44bb4f..cbec44bb4f 100644 --- a/tests/auto/declarative/qsgflickable/data/flickable01.qml +++ b/tests/auto/declarative/qquickflickable/data/flickable01.qml diff --git a/tests/auto/declarative/qsgflickable/data/flickable02.qml b/tests/auto/declarative/qquickflickable/data/flickable02.qml index 80caa32da5..80caa32da5 100644 --- a/tests/auto/declarative/qsgflickable/data/flickable02.qml +++ b/tests/auto/declarative/qquickflickable/data/flickable02.qml diff --git a/tests/auto/declarative/qsgflickable/data/flickable03.qml b/tests/auto/declarative/qquickflickable/data/flickable03.qml index ebc49ba90a..ebc49ba90a 100644 --- a/tests/auto/declarative/qsgflickable/data/flickable03.qml +++ b/tests/auto/declarative/qquickflickable/data/flickable03.qml diff --git a/tests/auto/declarative/qsgflickable/data/flickable04.qml b/tests/auto/declarative/qquickflickable/data/flickable04.qml index b2f30b84ec..b2f30b84ec 100644 --- a/tests/auto/declarative/qsgflickable/data/flickable04.qml +++ b/tests/auto/declarative/qquickflickable/data/flickable04.qml diff --git a/tests/auto/declarative/qsgflickable/data/flickableqgraphicswidget.qml b/tests/auto/declarative/qquickflickable/data/flickableqgraphicswidget.qml index bb8f1eefc6..bb8f1eefc6 100644 --- a/tests/auto/declarative/qsgflickable/data/flickableqgraphicswidget.qml +++ b/tests/auto/declarative/qquickflickable/data/flickableqgraphicswidget.qml diff --git a/tests/auto/declarative/qsgflickable/data/margins.qml b/tests/auto/declarative/qquickflickable/data/margins.qml index 4866bd8301..4866bd8301 100644 --- a/tests/auto/declarative/qsgflickable/data/margins.qml +++ b/tests/auto/declarative/qquickflickable/data/margins.qml diff --git a/tests/auto/declarative/qsgflickable/data/nestedPressDelay.qml b/tests/auto/declarative/qquickflickable/data/nestedPressDelay.qml index 60dadcc73c..60dadcc73c 100644 --- a/tests/auto/declarative/qsgflickable/data/nestedPressDelay.qml +++ b/tests/auto/declarative/qquickflickable/data/nestedPressDelay.qml diff --git a/tests/auto/declarative/qsgflickable/data/resize.qml b/tests/auto/declarative/qquickflickable/data/resize.qml index 1a9ef54107..1a9ef54107 100644 --- a/tests/auto/declarative/qsgflickable/data/resize.qml +++ b/tests/auto/declarative/qquickflickable/data/resize.qml diff --git a/tests/auto/declarative/qsgflickable/data/wheel.qml b/tests/auto/declarative/qquickflickable/data/wheel.qml index 2928bbcd72..2928bbcd72 100644 --- a/tests/auto/declarative/qsgflickable/data/wheel.qml +++ b/tests/auto/declarative/qquickflickable/data/wheel.qml diff --git a/tests/auto/declarative/qsgflickable/qsgflickable.pro b/tests/auto/declarative/qquickflickable/qquickflickable.pro index 48cf8b6335..ba951cc051 100644 --- a/tests/auto/declarative/qsgflickable/qsgflickable.pro +++ b/tests/auto/declarative/qquickflickable/qquickflickable.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qsgflickable +TARGET = tst_qquickflickable macx:CONFIG -= app_bundle -SOURCES += tst_qsgflickable.cpp +SOURCES += tst_qquickflickable.cpp testDataFiles.files = data testDataFiles.path = . diff --git a/tests/auto/declarative/qsgflickable/tst_qsgflickable.cpp b/tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp index f8d7bfd28d..2f155e298e 100644 --- a/tests/auto/declarative/qsgflickable/tst_qsgflickable.cpp +++ b/tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp @@ -42,18 +42,18 @@ #include <QtTest/QSignalSpy> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgview.h> -#include <private/qsgflickable_p.h> +#include <QtDeclarative/qquickview.h> +#include <private/qquickflickable_p.h> #include <private/qdeclarativevaluetype_p.h> #include <math.h> #include "../shared/util.h" #include <QtOpenGL/QGLShaderProgram> -class tst_qsgflickable : public QObject +class tst_qquickflickable : public QObject { Q_OBJECT public: - tst_qsgflickable(); + tst_qquickflickable(); private slots: void initTestCase(); @@ -80,30 +80,30 @@ private slots: private: QDeclarativeEngine engine; - void flick(QSGView *canvas, const QPoint &from, const QPoint &to, int duration); + void flick(QQuickView *canvas, const QPoint &from, const QPoint &to, int duration); template<typename T> - T *findItem(QSGItem *parent, const QString &objectName); + T *findItem(QQuickItem *parent, const QString &objectName); }; -tst_qsgflickable::tst_qsgflickable() +tst_qquickflickable::tst_qquickflickable() { } -void tst_qsgflickable::initTestCase() +void tst_qquickflickable::initTestCase() { } -void tst_qsgflickable::cleanupTestCase() +void tst_qquickflickable::cleanupTestCase() { } -void tst_qsgflickable::create() +void tst_qquickflickable::create() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("flickable01.qml"))); - QSGFlickable *obj = qobject_cast<QSGFlickable*>(c.create()); + QQuickFlickable *obj = qobject_cast<QQuickFlickable*>(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->isAtXBeginning(), true); @@ -117,18 +117,18 @@ void tst_qsgflickable::create() QCOMPARE(obj->verticalVelocity(), 0.); QCOMPARE(obj->isInteractive(), true); - QCOMPARE(obj->boundsBehavior(), QSGFlickable::DragAndOvershootBounds); + QCOMPARE(obj->boundsBehavior(), QQuickFlickable::DragAndOvershootBounds); QCOMPARE(obj->pressDelay(), 0); QCOMPARE(obj->maximumFlickVelocity(), 2500.); delete obj; } -void tst_qsgflickable::horizontalViewportSize() +void tst_qquickflickable::horizontalViewportSize() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("flickable02.qml"))); - QSGFlickable *obj = qobject_cast<QSGFlickable*>(c.create()); + QQuickFlickable *obj = qobject_cast<QQuickFlickable*>(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->contentWidth(), 800.); @@ -141,11 +141,11 @@ void tst_qsgflickable::horizontalViewportSize() delete obj; } -void tst_qsgflickable::verticalViewportSize() +void tst_qquickflickable::verticalViewportSize() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("flickable03.qml"))); - QSGFlickable *obj = qobject_cast<QSGFlickable*>(c.create()); + QQuickFlickable *obj = qobject_cast<QQuickFlickable*>(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->contentWidth(), 200.); @@ -158,15 +158,15 @@ void tst_qsgflickable::verticalViewportSize() delete obj; } -void tst_qsgflickable::properties() +void tst_qquickflickable::properties() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("flickable04.qml"))); - QSGFlickable *obj = qobject_cast<QSGFlickable*>(c.create()); + QQuickFlickable *obj = qobject_cast<QQuickFlickable*>(c.create()); QVERIFY(obj != 0); QCOMPARE(obj->isInteractive(), false); - QCOMPARE(obj->boundsBehavior(), QSGFlickable::StopAtBounds); + QCOMPARE(obj->boundsBehavior(), QQuickFlickable::StopAtBounds); QCOMPARE(obj->pressDelay(), 200); QCOMPARE(obj->maximumFlickVelocity(), 2000.); @@ -177,40 +177,40 @@ void tst_qsgflickable::properties() delete obj; } -void tst_qsgflickable::boundsBehavior() +void tst_qquickflickable::boundsBehavior() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { boundsBehavior: Flickable.StopAtBounds }", QUrl::fromLocalFile("")); - QSGFlickable *flickable = qobject_cast<QSGFlickable*>(component.create()); + QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(component.create()); QSignalSpy spy(flickable, SIGNAL(boundsBehaviorChanged())); QVERIFY(flickable); - QVERIFY(flickable->boundsBehavior() == QSGFlickable::StopAtBounds); + QVERIFY(flickable->boundsBehavior() == QQuickFlickable::StopAtBounds); - flickable->setBoundsBehavior(QSGFlickable::DragAndOvershootBounds); - QVERIFY(flickable->boundsBehavior() == QSGFlickable::DragAndOvershootBounds); + flickable->setBoundsBehavior(QQuickFlickable::DragAndOvershootBounds); + QVERIFY(flickable->boundsBehavior() == QQuickFlickable::DragAndOvershootBounds); QCOMPARE(spy.count(),1); - flickable->setBoundsBehavior(QSGFlickable::DragAndOvershootBounds); + flickable->setBoundsBehavior(QQuickFlickable::DragAndOvershootBounds); QCOMPARE(spy.count(),1); - flickable->setBoundsBehavior(QSGFlickable::DragOverBounds); - QVERIFY(flickable->boundsBehavior() == QSGFlickable::DragOverBounds); + flickable->setBoundsBehavior(QQuickFlickable::DragOverBounds); + QVERIFY(flickable->boundsBehavior() == QQuickFlickable::DragOverBounds); QCOMPARE(spy.count(),2); - flickable->setBoundsBehavior(QSGFlickable::DragOverBounds); + flickable->setBoundsBehavior(QQuickFlickable::DragOverBounds); QCOMPARE(spy.count(),2); - flickable->setBoundsBehavior(QSGFlickable::StopAtBounds); - QVERIFY(flickable->boundsBehavior() == QSGFlickable::StopAtBounds); + flickable->setBoundsBehavior(QQuickFlickable::StopAtBounds); + QVERIFY(flickable->boundsBehavior() == QQuickFlickable::StopAtBounds); QCOMPARE(spy.count(),3); - flickable->setBoundsBehavior(QSGFlickable::StopAtBounds); + flickable->setBoundsBehavior(QQuickFlickable::StopAtBounds); QCOMPARE(spy.count(),3); } -void tst_qsgflickable::maximumFlickVelocity() +void tst_qquickflickable::maximumFlickVelocity() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile("")); - QSGFlickable *flickable = qobject_cast<QSGFlickable*>(component.create()); + QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(component.create()); QSignalSpy spy(flickable, SIGNAL(maximumFlickVelocityChanged())); QVERIFY(flickable); @@ -223,11 +223,11 @@ void tst_qsgflickable::maximumFlickVelocity() QCOMPARE(spy.count(),1); } -void tst_qsgflickable::flickDeceleration() +void tst_qquickflickable::flickDeceleration() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile("")); - QSGFlickable *flickable = qobject_cast<QSGFlickable*>(component.create()); + QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(component.create()); QSignalSpy spy(flickable, SIGNAL(flickDecelerationChanged())); QVERIFY(flickable); @@ -240,11 +240,11 @@ void tst_qsgflickable::flickDeceleration() QCOMPARE(spy.count(),1); } -void tst_qsgflickable::pressDelay() +void tst_qquickflickable::pressDelay() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { pressDelay: 100; }", QUrl::fromLocalFile("")); - QSGFlickable *flickable = qobject_cast<QSGFlickable*>(component.create()); + QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(component.create()); QSignalSpy spy(flickable, SIGNAL(pressDelayChanged())); QVERIFY(flickable); @@ -258,18 +258,18 @@ void tst_qsgflickable::pressDelay() } // QTBUG-17361 -void tst_qsgflickable::nestedPressDelay() +void tst_qquickflickable::nestedPressDelay() { - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->setSource(QUrl::fromLocalFile(TESTDATA("nestedPressDelay.qml"))); canvas->show(); canvas->requestActivateWindow(); QVERIFY(canvas->rootObject() != 0); - QSGFlickable *outer = qobject_cast<QSGFlickable*>(canvas->rootObject()); + QQuickFlickable *outer = qobject_cast<QQuickFlickable*>(canvas->rootObject()); QVERIFY(outer != 0); - QSGFlickable *inner = canvas->rootObject()->findChild<QSGFlickable*>("innerFlickable"); + QQuickFlickable *inner = canvas->rootObject()->findChild<QQuickFlickable*>("innerFlickable"); QVERIFY(inner != 0); QTest::mousePress(canvas, Qt::LeftButton, 0, QPoint(150, 150)); @@ -285,40 +285,40 @@ void tst_qsgflickable::nestedPressDelay() delete canvas; } -void tst_qsgflickable::flickableDirection() +void tst_qquickflickable::flickableDirection() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Flickable { flickableDirection: Flickable.VerticalFlick; }", QUrl::fromLocalFile("")); - QSGFlickable *flickable = qobject_cast<QSGFlickable*>(component.create()); + QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(component.create()); QSignalSpy spy(flickable, SIGNAL(flickableDirectionChanged())); QVERIFY(flickable); - QCOMPARE(flickable->flickableDirection(), QSGFlickable::VerticalFlick); + QCOMPARE(flickable->flickableDirection(), QQuickFlickable::VerticalFlick); - flickable->setFlickableDirection(QSGFlickable::HorizontalAndVerticalFlick); - QCOMPARE(flickable->flickableDirection(), QSGFlickable::HorizontalAndVerticalFlick); + flickable->setFlickableDirection(QQuickFlickable::HorizontalAndVerticalFlick); + QCOMPARE(flickable->flickableDirection(), QQuickFlickable::HorizontalAndVerticalFlick); QCOMPARE(spy.count(),1); - flickable->setFlickableDirection(QSGFlickable::AutoFlickDirection); - QCOMPARE(flickable->flickableDirection(), QSGFlickable::AutoFlickDirection); + flickable->setFlickableDirection(QQuickFlickable::AutoFlickDirection); + QCOMPARE(flickable->flickableDirection(), QQuickFlickable::AutoFlickDirection); QCOMPARE(spy.count(),2); - flickable->setFlickableDirection(QSGFlickable::HorizontalFlick); - QCOMPARE(flickable->flickableDirection(), QSGFlickable::HorizontalFlick); + flickable->setFlickableDirection(QQuickFlickable::HorizontalFlick); + QCOMPARE(flickable->flickableDirection(), QQuickFlickable::HorizontalFlick); QCOMPARE(spy.count(),3); - flickable->setFlickableDirection(QSGFlickable::HorizontalFlick); - QCOMPARE(flickable->flickableDirection(), QSGFlickable::HorizontalFlick); + flickable->setFlickableDirection(QQuickFlickable::HorizontalFlick); + QCOMPARE(flickable->flickableDirection(), QQuickFlickable::HorizontalFlick); QCOMPARE(spy.count(),3); } // QtQuick 1.1 -void tst_qsgflickable::resizeContent() +void tst_qquickflickable::resizeContent() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("resize.qml"))); - QSGItem *root = qobject_cast<QSGItem*>(c.create()); - QSGFlickable *obj = findItem<QSGFlickable>(root, "flick"); + QQuickItem *root = qobject_cast<QQuickItem*>(c.create()); + QQuickFlickable *obj = findItem<QQuickFlickable>(root, "flick"); QVERIFY(obj != 0); QCOMPARE(obj->contentX(), 0.); @@ -337,12 +337,12 @@ void tst_qsgflickable::resizeContent() } // QtQuick 1.1 -void tst_qsgflickable::returnToBounds() +void tst_qquickflickable::returnToBounds() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("resize.qml"))); - QSGItem *root = qobject_cast<QSGItem*>(c.create()); - QSGFlickable *obj = findItem<QSGFlickable>(root, "flick"); + QQuickItem *root = qobject_cast<QQuickItem*>(c.create()); + QQuickFlickable *obj = findItem<QQuickFlickable>(root, "flick"); QVERIFY(obj != 0); QCOMPARE(obj->contentX(), 0.); @@ -363,15 +363,15 @@ void tst_qsgflickable::returnToBounds() delete root; } -void tst_qsgflickable::wheel() +void tst_qquickflickable::wheel() { - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->setSource(QUrl::fromLocalFile(TESTDATA("wheel.qml"))); canvas->show(); canvas->requestActivateWindow(); QVERIFY(canvas->rootObject() != 0); - QSGFlickable *flick = canvas->rootObject()->findChild<QSGFlickable*>("flick"); + QQuickFlickable *flick = canvas->rootObject()->findChild<QQuickFlickable*>("flick"); QVERIFY(flick != 0); { @@ -398,16 +398,16 @@ void tst_qsgflickable::wheel() delete canvas; } -void tst_qsgflickable::movingAndDragging() +void tst_qquickflickable::movingAndDragging() { - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->setSource(QUrl::fromLocalFile(TESTDATA("flickable03.qml"))); canvas->show(); canvas->requestActivateWindow(); QTest::qWaitForWindowShown(canvas); QVERIFY(canvas->rootObject() != 0); - QSGFlickable *flickable = qobject_cast<QSGFlickable*>(canvas->rootObject()); + QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(canvas->rootObject()); QVERIFY(flickable != 0); QSignalSpy vDragSpy(flickable, SIGNAL(draggingVerticallyChanged())); @@ -503,15 +503,15 @@ void tst_qsgflickable::movingAndDragging() delete canvas; } -void tst_qsgflickable::disabled() +void tst_qquickflickable::disabled() { - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->setSource(QUrl::fromLocalFile(TESTDATA("disabled.qml"))); canvas->show(); canvas->requestActivateWindow(); QVERIFY(canvas->rootObject() != 0); - QSGFlickable *flick = canvas->rootObject()->findChild<QSGFlickable*>("flickable"); + QQuickFlickable *flick = canvas->rootObject()->findChild<QQuickFlickable*>("flickable"); QVERIFY(flick != 0); QTest::mousePress(canvas, Qt::LeftButton, 0, QPoint(50, 90)); @@ -531,19 +531,19 @@ void tst_qsgflickable::disabled() QTRY_VERIFY(canvas->rootObject()->property("clicked").toBool() == true); } -void tst_qsgflickable::flickVelocity() +void tst_qquickflickable::flickVelocity() { #ifdef Q_WS_MAC QSKIP("Producing flicks on Mac CI impossible due to timing problems"); #endif - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->setSource(QUrl::fromLocalFile(TESTDATA("flickable03.qml"))); canvas->show(); canvas->requestActivateWindow(); QVERIFY(canvas->rootObject() != 0); - QSGFlickable *flickable = qobject_cast<QSGFlickable*>(canvas->rootObject()); + QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(canvas->rootObject()); QVERIFY(flickable != 0); // flick up @@ -559,12 +559,12 @@ void tst_qsgflickable::flickVelocity() delete canvas; } -void tst_qsgflickable::margins() +void tst_qquickflickable::margins() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("margins.qml"))); - QSGItem *root = qobject_cast<QSGItem*>(c.create()); - QSGFlickable *obj = qobject_cast<QSGFlickable*>(root); + QQuickItem *root = qobject_cast<QQuickItem*>(c.create()); + QQuickFlickable *obj = qobject_cast<QQuickFlickable*>(root); QVERIFY(obj != 0); // starting state @@ -618,7 +618,7 @@ void tst_qsgflickable::margins() delete root; } -void tst_qsgflickable::flick(QSGView *canvas, const QPoint &from, const QPoint &to, int duration) +void tst_qquickflickable::flick(QQuickView *canvas, const QPoint &from, const QPoint &to, int duration) { const int pointCount = 5; QPoint diff = to - from; @@ -637,12 +637,12 @@ void tst_qsgflickable::flick(QSGView *canvas, const QPoint &from, const QPoint & } template<typename T> -T *tst_qsgflickable::findItem(QSGItem *parent, const QString &objectName) +T *tst_qquickflickable::findItem(QQuickItem *parent, const QString &objectName) { const QMetaObject &mo = T::staticMetaObject; //qDebug() << parent->childItems().count() << "children"; for (int i = 0; i < parent->childItems().count(); ++i) { - QSGItem *item = qobject_cast<QSGItem*>(parent->childItems().at(i)); + QQuickItem *item = qobject_cast<QQuickItem*>(parent->childItems().at(i)); if (!item) continue; //qDebug() << "try" << item; @@ -657,6 +657,6 @@ T *tst_qsgflickable::findItem(QSGItem *parent, const QString &objectName) return 0; } -QTEST_MAIN(tst_qsgflickable) +QTEST_MAIN(tst_qquickflickable) -#include "tst_qsgflickable.moc" +#include "tst_qquickflickable.moc" diff --git a/tests/auto/declarative/qsgflipable/data/crash.qml b/tests/auto/declarative/qquickflipable/data/crash.qml index a0327918cb..a0327918cb 100644 --- a/tests/auto/declarative/qsgflipable/data/crash.qml +++ b/tests/auto/declarative/qquickflipable/data/crash.qml diff --git a/tests/auto/declarative/qsgflipable/data/flipable-abort.qml b/tests/auto/declarative/qquickflipable/data/flipable-abort.qml index 90fc03a5f9..90fc03a5f9 100644 --- a/tests/auto/declarative/qsgflipable/data/flipable-abort.qml +++ b/tests/auto/declarative/qquickflipable/data/flipable-abort.qml diff --git a/tests/auto/declarative/qsgflipable/data/test-flipable.qml b/tests/auto/declarative/qquickflipable/data/test-flipable.qml index dff6d3fe39..dff6d3fe39 100644 --- a/tests/auto/declarative/qsgflipable/data/test-flipable.qml +++ b/tests/auto/declarative/qquickflipable/data/test-flipable.qml diff --git a/tests/auto/declarative/qsgflipable/qsgflipable.pro b/tests/auto/declarative/qquickflipable/qquickflipable.pro index 806aeb28e7..a36c468c1c 100644 --- a/tests/auto/declarative/qsgflipable/qsgflipable.pro +++ b/tests/auto/declarative/qquickflipable/qquickflipable.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qsgflipable +TARGET = tst_qquickflipable macx:CONFIG -= app_bundle -SOURCES += tst_qsgflipable.cpp +SOURCES += tst_qquickflipable.cpp testDataFiles.files = data testDataFiles.path = . diff --git a/tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp b/tests/auto/declarative/qquickflipable/tst_qquickflipable.cpp index 2fc1924c9a..7243836031 100644 --- a/tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp +++ b/tests/auto/declarative/qquickflipable/tst_qquickflipable.cpp @@ -41,20 +41,20 @@ #include <qtest.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgview.h> -#include <private/qsgflipable_p.h> +#include <QtDeclarative/qquickview.h> +#include <private/qquickflipable_p.h> #include <private/qdeclarativevaluetype_p.h> #include <QFontMetrics> -#include <private/qsgrectangle_p.h> +#include <private/qquickrectangle_p.h> #include <math.h> #include <QtOpenGL/QGLShaderProgram> #include "../shared/util.h" -class tst_qsgflipable : public QObject +class tst_qquickflipable : public QObject { Q_OBJECT public: - tst_qsgflipable(); + tst_qquickflipable(); private slots: void initTestCase(); @@ -71,33 +71,33 @@ private: QDeclarativeEngine engine; }; -tst_qsgflipable::tst_qsgflipable() +tst_qquickflipable::tst_qquickflipable() { } -void tst_qsgflipable::initTestCase() +void tst_qquickflipable::initTestCase() { } -void tst_qsgflipable::cleanupTestCase() +void tst_qquickflipable::cleanupTestCase() { } -void tst_qsgflipable::create() +void tst_qquickflipable::create() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml"))); - QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create()); + QQuickFlipable *obj = qobject_cast<QQuickFlipable*>(c.create()); QVERIFY(obj != 0); delete obj; } -void tst_qsgflipable::checkFrontAndBack() +void tst_qquickflipable::checkFrontAndBack() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml"))); - QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create()); + QQuickFlipable *obj = qobject_cast<QQuickFlipable*>(c.create()); QVERIFY(obj != 0); QVERIFY(obj->front() != 0); @@ -105,11 +105,11 @@ void tst_qsgflipable::checkFrontAndBack() delete obj; } -void tst_qsgflipable::setFrontAndBack() +void tst_qquickflipable::setFrontAndBack() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml"))); - QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create()); + QQuickFlipable *obj = qobject_cast<QQuickFlipable*>(c.create()); QVERIFY(obj != 0); QVERIFY(obj->front() != 0); @@ -117,34 +117,34 @@ void tst_qsgflipable::setFrontAndBack() QString message = c.url().toString() + ":3:1: QML Flipable: front is a write-once property"; QTest::ignoreMessage(QtWarningMsg, qPrintable(message)); - obj->setFront(new QSGRectangle()); + obj->setFront(new QQuickRectangle()); message = c.url().toString() + ":3:1: QML Flipable: back is a write-once property"; QTest::ignoreMessage(QtWarningMsg, qPrintable(message)); - obj->setBack(new QSGRectangle()); + obj->setBack(new QQuickRectangle()); delete obj; } -void tst_qsgflipable::QTBUG_9161_crash() +void tst_qquickflipable::QTBUG_9161_crash() { - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->setSource(QUrl::fromLocalFile(TESTDATA("crash.qml"))); - QSGItem *root = canvas->rootObject(); + QQuickItem *root = canvas->rootObject(); QVERIFY(root != 0); canvas->show(); delete canvas; } -void tst_qsgflipable::QTBUG_8474_qgv_abort() +void tst_qquickflipable::QTBUG_8474_qgv_abort() { - QSGView *canvas = new QSGView; + QQuickView *canvas = new QQuickView; canvas->setSource(QUrl::fromLocalFile(TESTDATA("flipable-abort.qml"))); - QSGItem *root = canvas->rootObject(); + QQuickItem *root = canvas->rootObject(); QVERIFY(root != 0); canvas->show(); delete canvas; } -QTEST_MAIN(tst_qsgflipable) +QTEST_MAIN(tst_qquickflipable) -#include "tst_qsgflipable.moc" +#include "tst_qquickflipable.moc" diff --git a/tests/auto/declarative/qsgfocusscope/data/canvasFocus.qml b/tests/auto/declarative/qquickfocusscope/data/canvasFocus.qml index 7d8dac5a22..7d8dac5a22 100644 --- a/tests/auto/declarative/qsgfocusscope/data/canvasFocus.qml +++ b/tests/auto/declarative/qquickfocusscope/data/canvasFocus.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/chain.qml b/tests/auto/declarative/qquickfocusscope/data/chain.qml index 4b96662318..4b96662318 100644 --- a/tests/auto/declarative/qsgfocusscope/data/chain.qml +++ b/tests/auto/declarative/qquickfocusscope/data/chain.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/forceActiveFocus.qml b/tests/auto/declarative/qquickfocusscope/data/forceActiveFocus.qml index 74d2106888..74d2106888 100644 --- a/tests/auto/declarative/qsgfocusscope/data/forceActiveFocus.qml +++ b/tests/auto/declarative/qquickfocusscope/data/forceActiveFocus.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/forcefocus.qml b/tests/auto/declarative/qquickfocusscope/data/forcefocus.qml index f41582a951..f41582a951 100644 --- a/tests/auto/declarative/qsgfocusscope/data/forcefocus.qml +++ b/tests/auto/declarative/qquickfocusscope/data/forcefocus.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/qtBug13380.qml b/tests/auto/declarative/qquickfocusscope/data/qtBug13380.qml index 29de046b38..29de046b38 100644 --- a/tests/auto/declarative/qsgfocusscope/data/qtBug13380.qml +++ b/tests/auto/declarative/qquickfocusscope/data/qtBug13380.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/signalEmission.qml b/tests/auto/declarative/qquickfocusscope/data/signalEmission.qml index 999a40c5ad..999a40c5ad 100644 --- a/tests/auto/declarative/qsgfocusscope/data/signalEmission.qml +++ b/tests/auto/declarative/qquickfocusscope/data/signalEmission.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/test.qml b/tests/auto/declarative/qquickfocusscope/data/test.qml index 67be29c3fb..67be29c3fb 100644 --- a/tests/auto/declarative/qsgfocusscope/data/test.qml +++ b/tests/auto/declarative/qquickfocusscope/data/test.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/test2.qml b/tests/auto/declarative/qquickfocusscope/data/test2.qml index ad74f3e9f4..ad74f3e9f4 100644 --- a/tests/auto/declarative/qsgfocusscope/data/test2.qml +++ b/tests/auto/declarative/qquickfocusscope/data/test2.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/test3.qml b/tests/auto/declarative/qquickfocusscope/data/test3.qml index 537c30816e..537c30816e 100644 --- a/tests/auto/declarative/qsgfocusscope/data/test3.qml +++ b/tests/auto/declarative/qquickfocusscope/data/test3.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/test4.qml b/tests/auto/declarative/qquickfocusscope/data/test4.qml index 0eea649f5d..0eea649f5d 100644 --- a/tests/auto/declarative/qsgfocusscope/data/test4.qml +++ b/tests/auto/declarative/qquickfocusscope/data/test4.qml diff --git a/tests/auto/declarative/qsgfocusscope/data/test5.qml b/tests/auto/declarative/qquickfocusscope/data/test5.qml index 9c37cd1303..9c37cd1303 100644 --- a/tests/auto/declarative/qsgfocusscope/data/test5.qml +++ b/tests/auto/declarative/qquickfocusscope/data/test5.qml diff --git a/tests/auto/declarative/qsgfocusscope/qsgfocusscope.pro b/tests/auto/declarative/qquickfocusscope/qquickfocusscope.pro index 4b7b436ac6..79649ebb8a 100644 --- a/tests/auto/declarative/qsgfocusscope/qsgfocusscope.pro +++ b/tests/auto/declarative/qquickfocusscope/qquickfocusscope.pro @@ -1,6 +1,6 @@ CONFIG += testcase -TARGET = tst_qsgfocusscope -SOURCES += tst_qsgfocusscope.cpp +TARGET = tst_qquickfocusscope +SOURCES += tst_qquickfocusscope.cpp macx:CONFIG -= app_bundle testDataFiles.files = data diff --git a/tests/auto/declarative/qsgfocusscope/tst_qsgfocusscope.cpp b/tests/auto/declarative/qquickfocusscope/tst_qquickfocusscope.cpp index c70ba69f36..6e7dd98940 100644 --- a/tests/auto/declarative/qsgfocusscope/tst_qsgfocusscope.cpp +++ b/tests/auto/declarative/qquickfocusscope/tst_qquickfocusscope.cpp @@ -42,21 +42,21 @@ #include <QSignalSpy> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgview.h> -#include <private/qsgrectangle_p.h> -#include <private/qsgtextedit_p.h> -#include <private/qsgtext_p.h> -#include <QtDeclarative/private/qsgfocusscope_p.h> +#include <QtDeclarative/qquickview.h> +#include <private/qquickrectangle_p.h> +#include <private/qquicktextedit_p.h> +#include <private/qquicktext_p.h> +#include <QtDeclarative/private/qquickfocusscope_p.h> #include "../shared/util.h" -class tst_qsgfocusscope : public QObject +class tst_qquickfocusscope : public QObject { Q_OBJECT public: - tst_qsgfocusscope() {} + tst_qquickfocusscope() {} template<typename T> - T *findItem(QSGItem *parent, const QString &id); + T *findItem(QQuickItem *parent, const QString &id); private slots: void initTestCase(); @@ -72,11 +72,11 @@ private slots: void forceActiveFocus(); void canvasFocus(); }; -void tst_qsgfocusscope::initTestCase() +void tst_qquickfocusscope::initTestCase() { } -void tst_qsgfocusscope::cleanupTestCase() +void tst_qquickfocusscope::cleanupTestCase() { } @@ -85,12 +85,12 @@ void tst_qsgfocusscope::cleanupTestCase() Find an item with the specified id. */ template<typename T> -T *tst_qsgfocusscope::findItem(QSGItem *parent, const QString &objectName) +T *tst_qquickfocusscope::findItem(QQuickItem *parent, const QString &objectName) { const QMetaObject &mo = T::staticMetaObject; - QList<QSGItem *> children = parent->childItems(); + QList<QQuickItem *> children = parent->childItems(); for (int i = 0; i < children.count(); ++i) { - QSGItem *item = children.at(i); + QQuickItem *item = children.at(i); if (item) { if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) { return static_cast<T*>(item); @@ -103,15 +103,15 @@ T *tst_qsgfocusscope::findItem(QSGItem *parent, const QString &objectName) return 0; } -void tst_qsgfocusscope::basic() +void tst_qquickfocusscope::basic() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("test.qml"))); - QSGFocusScope *item0 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item0")); - QSGRectangle *item1 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item1")); - QSGRectangle *item2 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item2")); - QSGRectangle *item3 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item3")); + QQuickFocusScope *item0 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item0")); + QQuickRectangle *item1 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item1")); + QQuickRectangle *item2 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item2")); + QQuickRectangle *item3 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item3")); QVERIFY(item0 != 0); QVERIFY(item1 != 0); QVERIFY(item2 != 0); @@ -145,16 +145,16 @@ void tst_qsgfocusscope::basic() delete view; } -void tst_qsgfocusscope::nested() +void tst_qquickfocusscope::nested() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("test2.qml"))); - QSGFocusScope *item1 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item1")); - QSGFocusScope *item2 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item2")); - QSGFocusScope *item3 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item3")); - QSGFocusScope *item4 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item4")); - QSGFocusScope *item5 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item5")); + QQuickFocusScope *item1 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item1")); + QQuickFocusScope *item2 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item2")); + QQuickFocusScope *item3 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item3")); + QQuickFocusScope *item4 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item4")); + QQuickFocusScope *item5 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item5")); QVERIFY(item1 != 0); QVERIFY(item2 != 0); QVERIFY(item3 != 0); @@ -174,15 +174,15 @@ void tst_qsgfocusscope::nested() delete view; } -void tst_qsgfocusscope::noFocus() +void tst_qquickfocusscope::noFocus() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("test4.qml"))); - QSGRectangle *item0 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item0")); - QSGRectangle *item1 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item1")); - QSGRectangle *item2 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item2")); - QSGRectangle *item3 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item3")); + QQuickRectangle *item0 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item0")); + QQuickRectangle *item1 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item1")); + QQuickRectangle *item2 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item2")); + QQuickRectangle *item3 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item3")); QVERIFY(item0 != 0); QVERIFY(item1 != 0); QVERIFY(item2 != 0); @@ -212,15 +212,15 @@ void tst_qsgfocusscope::noFocus() delete view; } -void tst_qsgfocusscope::textEdit() +void tst_qquickfocusscope::textEdit() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("test5.qml"))); - QSGFocusScope *item0 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item0")); - QSGTextEdit *item1 = findItem<QSGTextEdit>(view->rootObject(), QLatin1String("item1")); - QSGRectangle *item2 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item2")); - QSGTextEdit *item3 = findItem<QSGTextEdit>(view->rootObject(), QLatin1String("item3")); + QQuickFocusScope *item0 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item0")); + QQuickTextEdit *item1 = findItem<QQuickTextEdit>(view->rootObject(), QLatin1String("item1")); + QQuickRectangle *item2 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item2")); + QQuickTextEdit *item3 = findItem<QQuickTextEdit>(view->rootObject(), QLatin1String("item3")); QVERIFY(item0 != 0); QVERIFY(item1 != 0); QVERIFY(item2 != 0); @@ -262,17 +262,17 @@ void tst_qsgfocusscope::textEdit() delete view; } -void tst_qsgfocusscope::forceFocus() +void tst_qquickfocusscope::forceFocus() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("forcefocus.qml"))); - QSGFocusScope *item0 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item0")); - QSGRectangle *item1 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item1")); - QSGRectangle *item2 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item2")); - QSGFocusScope *item3 = findItem<QSGFocusScope>(view->rootObject(), QLatin1String("item3")); - QSGRectangle *item4 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item4")); - QSGRectangle *item5 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item5")); + QQuickFocusScope *item0 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item0")); + QQuickRectangle *item1 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item1")); + QQuickRectangle *item2 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item2")); + QQuickFocusScope *item3 = findItem<QQuickFocusScope>(view->rootObject(), QLatin1String("item3")); + QQuickRectangle *item4 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item4")); + QQuickRectangle *item5 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item5")); QVERIFY(item0 != 0); QVERIFY(item1 != 0); QVERIFY(item2 != 0); @@ -310,9 +310,9 @@ void tst_qsgfocusscope::forceFocus() delete view; } -void tst_qsgfocusscope::noParentFocus() +void tst_qquickfocusscope::noParentFocus() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("chain.qml"))); QVERIFY(view->rootObject()); @@ -334,15 +334,15 @@ void tst_qsgfocusscope::noParentFocus() delete view; } -void tst_qsgfocusscope::signalEmission() +void tst_qquickfocusscope::signalEmission() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("signalEmission.qml"))); - QSGRectangle *item1 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item1")); - QSGRectangle *item2 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item2")); - QSGRectangle *item3 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item3")); - QSGRectangle *item4 = findItem<QSGRectangle>(view->rootObject(), QLatin1String("item4")); + QQuickRectangle *item1 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item1")); + QQuickRectangle *item2 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item2")); + QQuickRectangle *item3 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item3")); + QQuickRectangle *item4 = findItem<QQuickRectangle>(view->rootObject(), QLatin1String("item4")); QVERIFY(item1 != 0); QVERIFY(item2 != 0); QVERIFY(item3 != 0); @@ -389,9 +389,9 @@ void tst_qsgfocusscope::signalEmission() delete view; } -void tst_qsgfocusscope::qtBug13380() +void tst_qquickfocusscope::qtBug13380() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("qtBug13380.qml"))); view->show(); @@ -410,9 +410,9 @@ void tst_qsgfocusscope::qtBug13380() delete view; } -void tst_qsgfocusscope::forceActiveFocus() +void tst_qquickfocusscope::forceActiveFocus() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("forceActiveFocus.qml"))); view->show(); @@ -424,16 +424,16 @@ void tst_qsgfocusscope::forceActiveFocus() qt_x11_wait_for_window_manager(view); #endif - QSGItem *rootObject = view->rootObject(); + QQuickItem *rootObject = view->rootObject(); QVERIFY(rootObject); - QSGItem *scope = findItem<QSGItem>(rootObject, QLatin1String("scope")); - QSGItem *itemA1 = findItem<QSGItem>(rootObject, QLatin1String("item-a1")); - QSGItem *scopeA = findItem<QSGItem>(rootObject, QLatin1String("scope-a")); - QSGItem *itemA2 = findItem<QSGItem>(rootObject, QLatin1String("item-a2")); - QSGItem *itemB1 = findItem<QSGItem>(rootObject, QLatin1String("item-b1")); - QSGItem *scopeB = findItem<QSGItem>(rootObject, QLatin1String("scope-b")); - QSGItem *itemB2 = findItem<QSGItem>(rootObject, QLatin1String("item-b2")); + QQuickItem *scope = findItem<QQuickItem>(rootObject, QLatin1String("scope")); + QQuickItem *itemA1 = findItem<QQuickItem>(rootObject, QLatin1String("item-a1")); + QQuickItem *scopeA = findItem<QQuickItem>(rootObject, QLatin1String("scope-a")); + QQuickItem *itemA2 = findItem<QQuickItem>(rootObject, QLatin1String("item-a2")); + QQuickItem *itemB1 = findItem<QQuickItem>(rootObject, QLatin1String("item-b1")); + QQuickItem *scopeB = findItem<QQuickItem>(rootObject, QLatin1String("scope-b")); + QQuickItem *itemB2 = findItem<QQuickItem>(rootObject, QLatin1String("item-b2")); QVERIFY(scope); QVERIFY(itemA1); @@ -528,19 +528,19 @@ void tst_qsgfocusscope::forceActiveFocus() delete view; } -void tst_qsgfocusscope::canvasFocus() +void tst_qquickfocusscope::canvasFocus() { - QSGView *view = new QSGView; + QQuickView *view = new QQuickView; view->setSource(QUrl::fromLocalFile(TESTDATA("canvasFocus.qml"))); - QSGItem *rootObject = view->rootObject(); + QQuickItem *rootObject = view->rootObject(); QVERIFY(rootObject); - QSGItem *rootItem = view->rootItem(); - QSGItem *scope1 = findItem<QSGItem>(rootObject, QLatin1String("scope1")); - QSGItem *item1 = findItem<QSGItem>(rootObject, QLatin1String("item1")); - QSGItem *scope2 = findItem<QSGItem>(rootObject, QLatin1String("scope2")); - QSGItem *item2 = findItem<QSGItem>(rootObject, QLatin1String("item2")); + QQuickItem *rootItem = view->rootItem(); + QQuickItem *scope1 = findItem<QQuickItem>(rootObject, QLatin1String("scope1")); + QQuickItem *item1 = findItem<QQuickItem>(rootObject, QLatin1String("item1")); + QQuickItem *scope2 = findItem<QQuickItem>(rootObject, QLatin1String("scope2")); + QQuickItem *item2 = findItem<QQuickItem>(rootObject, QLatin1String("item2")); QVERIFY(scope1); QVERIFY(item1); @@ -653,6 +653,6 @@ void tst_qsgfocusscope::canvasFocus() delete view; } -QTEST_MAIN(tst_qsgfocusscope) +QTEST_MAIN(tst_qquickfocusscope) -#include "tst_qsgfocusscope.moc" +#include "tst_qquickfocusscope.moc" diff --git a/tests/auto/declarative/qsggridview/data/ComponentView.qml b/tests/auto/declarative/qquickgridview/data/ComponentView.qml index 12ab6c92d1..12ab6c92d1 100644 --- a/tests/auto/declarative/qsggridview/data/ComponentView.qml +++ b/tests/auto/declarative/qquickgridview/data/ComponentView.qml diff --git a/tests/auto/declarative/qsggridview/data/attachedSignals.qml b/tests/auto/declarative/qquickgridview/data/attachedSignals.qml index 73c10d8caf..73c10d8caf 100644 --- a/tests/auto/declarative/qsggridview/data/attachedSignals.qml +++ b/tests/auto/declarative/qquickgridview/data/attachedSignals.qml diff --git a/tests/auto/declarative/qsggridview/data/creationContext.qml b/tests/auto/declarative/qquickgridview/data/creationContext.qml index 79a682788b..79a682788b 100644 --- a/tests/auto/declarative/qsggridview/data/creationContext.qml +++ b/tests/auto/declarative/qquickgridview/data/creationContext.qml diff --git a/tests/auto/declarative/qsggridview/data/displaygrid.qml b/tests/auto/declarative/qquickgridview/data/displaygrid.qml index 1da4fe50ac..1da4fe50ac 100644 --- a/tests/auto/declarative/qsggridview/data/displaygrid.qml +++ b/tests/auto/declarative/qquickgridview/data/displaygrid.qml diff --git a/tests/auto/declarative/qsggridview/data/footer.qml b/tests/auto/declarative/qquickgridview/data/footer.qml index 9083f9f57c..9083f9f57c 100644 --- a/tests/auto/declarative/qsggridview/data/footer.qml +++ b/tests/auto/declarative/qquickgridview/data/footer.qml diff --git a/tests/auto/declarative/qsggridview/data/gridview-enforcerange.qml b/tests/auto/declarative/qquickgridview/data/gridview-enforcerange.qml index 2bfe7da78e..2bfe7da78e 100644 --- a/tests/auto/declarative/qsggridview/data/gridview-enforcerange.qml +++ b/tests/auto/declarative/qquickgridview/data/gridview-enforcerange.qml diff --git a/tests/auto/declarative/qsggridview/data/gridview-initCurrent.qml b/tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml index e3ec8f2d4a..e3ec8f2d4a 100644 --- a/tests/auto/declarative/qsggridview/data/gridview-initCurrent.qml +++ b/tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml diff --git a/tests/auto/declarative/qsggridview/data/gridview-noCurrent.qml b/tests/auto/declarative/qquickgridview/data/gridview-noCurrent.qml index 600716e2d4..600716e2d4 100644 --- a/tests/auto/declarative/qsggridview/data/gridview-noCurrent.qml +++ b/tests/auto/declarative/qquickgridview/data/gridview-noCurrent.qml diff --git a/tests/auto/declarative/qsggridview/data/gridview1.qml b/tests/auto/declarative/qquickgridview/data/gridview1.qml index e6a3923532..e6a3923532 100644 --- a/tests/auto/declarative/qsggridview/data/gridview1.qml +++ b/tests/auto/declarative/qquickgridview/data/gridview1.qml diff --git a/tests/auto/declarative/qsggridview/data/gridview2.qml b/tests/auto/declarative/qquickgridview/data/gridview2.qml index 5fb45a1613..5fb45a1613 100644 --- a/tests/auto/declarative/qsggridview/data/gridview2.qml +++ b/tests/auto/declarative/qquickgridview/data/gridview2.qml diff --git a/tests/auto/declarative/qsggridview/data/gridview3.qml b/tests/auto/declarative/qquickgridview/data/gridview3.qml index a8c1c5a0f7..a8c1c5a0f7 100644 --- a/tests/auto/declarative/qsggridview/data/gridview3.qml +++ b/tests/auto/declarative/qquickgridview/data/gridview3.qml diff --git a/tests/auto/declarative/qsggridview/data/gridview4.qml b/tests/auto/declarative/qquickgridview/data/gridview4.qml index eed3a2bdb1..eed3a2bdb1 100644 --- a/tests/auto/declarative/qsggridview/data/gridview4.qml +++ b/tests/auto/declarative/qquickgridview/data/gridview4.qml diff --git a/tests/auto/declarative/qsggridview/data/header.qml b/tests/auto/declarative/qquickgridview/data/header.qml index 648e2a2298..648e2a2298 100644 --- a/tests/auto/declarative/qsggridview/data/header.qml +++ b/tests/auto/declarative/qquickgridview/data/header.qml diff --git a/tests/auto/declarative/qsggridview/data/manual-highlight.qml b/tests/auto/declarative/qquickgridview/data/manual-highlight.qml index c2f1d20fb1..c2f1d20fb1 100644 --- a/tests/auto/declarative/qsggridview/data/manual-highlight.qml +++ b/tests/auto/declarative/qquickgridview/data/manual-highlight.qml diff --git a/tests/auto/declarative/qsggridview/data/margins.qml b/tests/auto/declarative/qquickgridview/data/margins.qml index d369658a91..d369658a91 100644 --- a/tests/auto/declarative/qsggridview/data/margins.qml +++ b/tests/auto/declarative/qquickgridview/data/margins.qml diff --git a/tests/auto/declarative/qsggridview/data/mirroring.qml b/tests/auto/declarative/qquickgridview/data/mirroring.qml index b9aff501c1..b9aff501c1 100644 --- a/tests/auto/declarative/qsggridview/data/mirroring.qml +++ b/tests/auto/declarative/qquickgridview/data/mirroring.qml diff --git a/tests/auto/declarative/qsggridview/data/propertychangestest.qml b/tests/auto/declarative/qquickgridview/data/propertychangestest.qml index 97efbe78f5..97efbe78f5 100644 --- a/tests/auto/declarative/qsggridview/data/propertychangestest.qml +++ b/tests/auto/declarative/qquickgridview/data/propertychangestest.qml diff --git a/tests/auto/declarative/qsggridview/data/resizeview.qml b/tests/auto/declarative/qquickgridview/data/resizeview.qml index 1f730a4a8a..1f730a4a8a 100644 --- a/tests/auto/declarative/qsggridview/data/resizeview.qml +++ b/tests/auto/declarative/qquickgridview/data/resizeview.qml diff --git a/tests/auto/declarative/qsggridview/data/setindex.qml b/tests/auto/declarative/qquickgridview/data/setindex.qml index ef80f3a2fb..ef80f3a2fb 100644 --- a/tests/auto/declarative/qsggridview/data/setindex.qml +++ b/tests/auto/declarative/qquickgridview/data/setindex.qml diff --git a/tests/auto/declarative/qsggridview/data/snapToRow.qml b/tests/auto/declarative/qquickgridview/data/snapToRow.qml index f079a048f0..f079a048f0 100644 --- a/tests/auto/declarative/qsggridview/data/snapToRow.qml +++ b/tests/auto/declarative/qquickgridview/data/snapToRow.qml diff --git a/tests/auto/declarative/qsggridview/qsggridview.pro b/tests/auto/declarative/qquickgridview/qquickgridview.pro index 6588472779..cf0302433f 100644 --- a/tests/auto/declarative/qsggridview/qsggridview.pro +++ b/tests/auto/declarative/qquickgridview/qquickgridview.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qsggridview +TARGET = tst_qquickgridview macx:CONFIG -= app_bundle -SOURCES += tst_qsggridview.cpp +SOURCES += tst_qquickgridview.cpp testDataFiles.files = data testDataFiles.path = . diff --git a/tests/auto/declarative/qsggridview/tst_qsggridview.cpp b/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp index 9e5c425632..333398a50e 100644 --- a/tests/auto/declarative/qsggridview/tst_qsggridview.cpp +++ b/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp @@ -41,27 +41,27 @@ #include <QtTest/QtTest> #include <QtWidgets/qstringlistmodel.h> -#include <QtDeclarative/qsgview.h> +#include <QtDeclarative/qquickview.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> #include <QtDeclarative/qdeclarativecontext.h> #include <QtDeclarative/qdeclarativeexpression.h> -#include <QtDeclarative/private/qsgitem_p.h> +#include <QtDeclarative/private/qquickitem_p.h> #include <QtDeclarative/private/qlistmodelinterface_p.h> -#include <QtDeclarative/private/qsggridview_p.h> -#include <QtDeclarative/private/qsgtext_p.h> +#include <QtDeclarative/private/qquickgridview_p.h> +#include <QtDeclarative/private/qquicktext_p.h> #include <QtDeclarative/private/qdeclarativelistmodel_p.h> #include "../shared/util.h" #include <QtGui/qguiapplication.h> Q_DECLARE_METATYPE(Qt::LayoutDirection) -Q_DECLARE_METATYPE(QSGGridView::Flow) +Q_DECLARE_METATYPE(QQuickGridView::Flow) -class tst_QSGGridView : public QObject +class tst_QQuickGridView : public QObject { Q_OBJECT public: - tst_QSGGridView(); + tst_QQuickGridView(); private slots: void initTestCase(); @@ -114,17 +114,17 @@ private slots: void snapToRow(); private: - QSGView *createView(); - void flick(QSGView *canvas, const QPoint &from, const QPoint &to, int duration); + QQuickView *createView(); + void flick(QQuickView *canvas, const QPoint &from, const QPoint &to, int duration); template<typename T> - T *findItem(QSGItem *parent, const QString &id, int index=-1); + T *findItem(QQuickItem *parent, const QString &id, int index=-1); template<typename T> - QList<T*> findItems(QSGItem *parent, const QString &objectName); - void dumpTree(QSGItem *parent, int depth = 0); + QList<T*> findItems(QQuickItem *parent, const QString &objectName); + void dumpTree(QQuickItem *parent, int depth = 0); }; template<typename T> -void tst_qsggridview_move(int from, int to, int n, T *items) +void tst_qquickgridview_move(int from, int to, int n, T *items) { if (n == 1) { items->move(from, to); @@ -145,11 +145,11 @@ void tst_qsggridview_move(int from, int to, int n, T *items) } } -void tst_QSGGridView::initTestCase() +void tst_QQuickGridView::initTestCase() { } -void tst_QSGGridView::cleanupTestCase() +void tst_QQuickGridView::cleanupTestCase() { } @@ -229,7 +229,7 @@ public: void moveItems(int from, int to, int count) { emit beginMoveRows(QModelIndex(), from, from+count-1, QModelIndex(), to > from ? to+count : to); - tst_qsggridview_move(from, to, count, &list); + tst_qquickgridview_move(from, to, count, &list); emit endMoveRows(); } @@ -250,13 +250,13 @@ private: QList<QPair<QString,QString> > list; }; -tst_QSGGridView::tst_QSGGridView() +tst_QQuickGridView::tst_QQuickGridView() { } -void tst_QSGGridView::items() +void tst_QQuickGridView::items() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; model.addItem("Fred", "12345"); @@ -275,10 +275,10 @@ void tst_QSGGridView::items() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); QTRY_COMPARE(gridview->count(), model.count()); @@ -286,10 +286,10 @@ void tst_QSGGridView::items() QTRY_COMPARE(contentItem->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item for (int i = 0; i < model.count(); ++i) { - QSGText *name = findItem<QSGText>(contentItem, "textName", i); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", i); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(i)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", i); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", i); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(i)); } @@ -298,15 +298,15 @@ void tst_QSGGridView::items() TestModel model2; ctxt->setContextProperty("testModel", &model2); - int itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + int itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); QTRY_VERIFY(itemCount == 0); delete canvas; } -void tst_QSGGridView::changed() +void tst_QQuickGridView::changed() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; model.addItem("Fred", "12345"); @@ -325,26 +325,26 @@ void tst_QSGGridView::changed() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGFlickable *gridview = findItem<QSGFlickable>(canvas->rootObject(), "grid"); + QQuickFlickable *gridview = findItem<QQuickFlickable>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); model.modifyItem(1, "Will", "9876"); - QSGText *name = findItem<QSGText>(contentItem, "textName", 1); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", 1); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(1)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", 1); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", 1); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(1)); delete canvas; } -void tst_QSGGridView::inserted() +void tst_QQuickGridView::inserted() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -360,10 +360,10 @@ void tst_QSGGridView::inserted() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); model.insertItem(1, "Will", "9876"); @@ -371,10 +371,10 @@ void tst_QSGGridView::inserted() QTRY_COMPARE(canvas->rootObject()->property("count").toInt(), model.count()); QTRY_COMPARE(contentItem->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item - QSGText *name = findItem<QSGText>(contentItem, "textName", 1); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", 1); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(1)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", 1); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", 1); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(1)); @@ -384,7 +384,7 @@ void tst_QSGGridView::inserted() // Confirm items positioned correctly for (int i = 0; i < model.count(); ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); QTRY_COMPARE(item->x(), (i%3)*80.0); QTRY_COMPARE(item->y(), (i/3)*60.0); } @@ -393,10 +393,10 @@ void tst_QSGGridView::inserted() QTRY_COMPARE(contentItem->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item - name = findItem<QSGText>(contentItem, "textName", 0); + name = findItem<QQuickText>(contentItem, "textName", 0); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(0)); - number = findItem<QSGText>(contentItem, "textNumber", 0); + number = findItem<QQuickText>(contentItem, "textNumber", 0); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(0)); @@ -404,7 +404,7 @@ void tst_QSGGridView::inserted() // Confirm items positioned correctly for (int i = 0; i < model.count(); ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); QTRY_VERIFY(item->x() == (i%3)*80); QTRY_VERIFY(item->y() == (i/3)*60); } @@ -422,16 +422,16 @@ void tst_QSGGridView::inserted() delete canvas; } -void tst_QSGGridView::inserted_more() +void tst_QQuickGridView::inserted_more() { QFETCH(qreal, contentY); QFETCH(int, insertIndex); QFETCH(int, insertCount); QFETCH(qreal, itemsOffsetAfterMove); - QSGText *name; - QSGText *number; - QSGView *canvas = createView(); + QQuickText *name; + QQuickText *number; + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -446,9 +446,9 @@ void tst_QSGGridView::inserted_more() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); gridview->setContentY(contentY); @@ -460,11 +460,11 @@ void tst_QSGGridView::inserted_more() QTRY_COMPARE(gridview->property("count").toInt(), model.count()); // check visibleItems.first() is in correct position - QSGItem *item0 = findItem<QSGItem>(contentItem, "wrapper", 0); + QQuickItem *item0 = findItem<QQuickItem>(contentItem, "wrapper", 0); QVERIFY(item0); QCOMPARE(item0->y(), itemsOffsetAfterMove); - QList<QSGItem*> items = findItems<QSGItem>(contentItem, "wrapper"); + QList<QQuickItem*> items = findItems<QQuickItem>(contentItem, "wrapper"); int firstVisibleIndex = -1; for (int i=0; i<items.count(); i++) { if (items[i]->y() >= contentY) { @@ -476,18 +476,18 @@ void tst_QSGGridView::inserted_more() QVERIFY2(firstVisibleIndex >= 0, QTest::toString(firstVisibleIndex)); // Confirm items positioned correctly and indexes correct - int itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + int itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = firstVisibleIndex; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); QVERIFY2(item, QTest::toString(QString("Item %1 not found").arg(i))); QCOMPARE(item->x(), (i%3)*80.0); QCOMPARE(item->y(), (i/3)*60.0 + itemsOffsetAfterMove); - name = findItem<QSGText>(contentItem, "textName", i); + name = findItem<QQuickText>(contentItem, "textName", i); QVERIFY(name != 0); QCOMPARE(name->text(), model.name(i)); - number = findItem<QSGText>(contentItem, "textNumber", i); + number = findItem<QQuickText>(contentItem, "textNumber", i); QVERIFY(number != 0); QCOMPARE(number->text(), model.number(i)); } @@ -495,7 +495,7 @@ void tst_QSGGridView::inserted_more() delete canvas; } -void tst_QSGGridView::inserted_more_data() +void tst_QQuickGridView::inserted_more_data() { QTest::addColumn<qreal>("contentY"); QTest::addColumn<int>("insertIndex"); @@ -594,9 +594,9 @@ void tst_QSGGridView::inserted_more_data() << 0.0; } -void tst_QSGGridView::removed() +void tst_QQuickGridView::removed() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -611,19 +611,19 @@ void tst_QSGGridView::removed() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); model.removeItem(1); QTRY_COMPARE(canvas->rootObject()->property("count").toInt(), model.count()); - QSGText *name = findItem<QSGText>(contentItem, "textName", 1); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", 1); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(1)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", 1); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", 1); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(1)); @@ -633,9 +633,9 @@ void tst_QSGGridView::removed() QTRY_COMPARE(removed, QString("Item1")); // Confirm items positioned correctly - int itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + int itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item->x() == (i%3)*80); QTRY_VERIFY(item->y() == (i/3)*60); @@ -645,18 +645,18 @@ void tst_QSGGridView::removed() model.removeItem(0); QTRY_COMPARE(canvas->rootObject()->property("count").toInt(), model.count()); - name = findItem<QSGText>(contentItem, "textName", 0); + name = findItem<QQuickText>(contentItem, "textName", 0); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(0)); - number = findItem<QSGText>(contentItem, "textNumber", 0); + number = findItem<QQuickText>(contentItem, "textNumber", 0); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(0)); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item->x() == (i%3)*80); QTRY_VERIFY(item->y() == (i/3)*60); @@ -667,9 +667,9 @@ void tst_QSGGridView::removed() QTRY_COMPARE(canvas->rootObject()->property("count").toInt(), model.count()); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item->x() == (i%3)*80); QTRY_VERIFY(item->y() == (i/3)*60); @@ -687,14 +687,14 @@ void tst_QSGGridView::removed() // Confirm items positioned correctly for (int i = 6; i < 18; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item->x() == (i%3)*80); QTRY_VERIFY(item->y() == (i/3)*60); } // Remove currentIndex - QSGItem *oldCurrent = gridview->currentItem(); + QQuickItem *oldCurrent = gridview->currentItem(); model.removeItem(9); QTRY_COMPARE(canvas->rootObject()->property("count").toInt(), model.count()); @@ -706,9 +706,9 @@ void tst_QSGGridView::removed() QTest::qWait(300); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); QTRY_VERIFY(item->x() == (i%3)*80); QTRY_VERIFY(item->y() == (i/3)*60); } @@ -740,9 +740,9 @@ void tst_QSGGridView::removed() delete canvas; } -void tst_QSGGridView::clear() +void tst_QQuickGridView::clear() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; for (int i = 0; i < 30; i++) @@ -756,10 +756,10 @@ void tst_QSGGridView::clear() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QVERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QVERIFY(contentItem != 0); model.clear(); @@ -778,7 +778,7 @@ void tst_QSGGridView::clear() delete canvas; } -void tst_QSGGridView::moved() +void tst_QQuickGridView::moved() { QFETCH(qreal, contentY); QFETCH(int, from); @@ -786,9 +786,9 @@ void tst_QSGGridView::moved() QFETCH(int, count); QFETCH(qreal, itemsOffsetAfterMove); - QSGText *name; - QSGText *number; - QSGView *canvas = createView(); + QQuickText *name; + QQuickText *number; + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -803,13 +803,13 @@ void tst_QSGGridView::moved() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); - QSGItem *currentItem = gridview->currentItem(); + QQuickItem *currentItem = gridview->currentItem(); QTRY_VERIFY(currentItem != 0); gridview->setContentY(contentY); @@ -820,20 +820,20 @@ void tst_QSGGridView::moved() // Confirm items positioned correctly and indexes correct int firstVisibleIndex = qCeil(contentY / 60.0) * 3; - int itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + int itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = firstVisibleIndex; i < model.count() && i < itemCount; ++i) { if (i >= firstVisibleIndex + 18) // index has moved out of view continue; - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); QVERIFY2(item, QTest::toString(QString("Item %1 not found").arg(i))); QTRY_COMPARE(item->x(), (i%3)*80.0); QTRY_COMPARE(item->y(), (i/3)*60.0 + itemsOffsetAfterMove); - name = findItem<QSGText>(contentItem, "textName", i); + name = findItem<QQuickText>(contentItem, "textName", i); QVERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(i)); - number = findItem<QSGText>(contentItem, "textNumber", i); + number = findItem<QQuickText>(contentItem, "textNumber", i); QVERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(i)); @@ -845,7 +845,7 @@ void tst_QSGGridView::moved() delete canvas; } -void tst_QSGGridView::moved_data() +void tst_QQuickGridView::moved_data() { QTest::addColumn<qreal>("contentY"); QTest::addColumn<int>("from"); @@ -983,14 +983,14 @@ struct ListChange { }; Q_DECLARE_METATYPE(QList<ListChange>) -void tst_QSGGridView::multipleChanges() +void tst_QQuickGridView::multipleChanges() { QFETCH(int, startCount); QFETCH(QList<ListChange>, changes); QFETCH(int, newCount); QFETCH(int, newCurrentIndex); - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -1005,7 +1005,7 @@ void tst_QSGGridView::multipleChanges() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); for (int i=0; i<changes.count(); i++) { @@ -1034,18 +1034,18 @@ void tst_QSGGridView::multipleChanges() QCOMPARE(gridview->count(), model.count()); QTRY_COMPARE(gridview->currentIndex(), newCurrentIndex); - QSGText *name; - QSGText *number; - QSGItem *contentItem = gridview->contentItem(); + QQuickText *name; + QQuickText *number; + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); - int itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + int itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i=0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); QVERIFY2(item, QTest::toString(QString("Item %1 not found").arg(i))); - name = findItem<QSGText>(contentItem, "textName", i); + name = findItem<QQuickText>(contentItem, "textName", i); QVERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(i)); - number = findItem<QSGText>(contentItem, "textNumber", i); + number = findItem<QQuickText>(contentItem, "textNumber", i); QVERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(i)); } @@ -1053,7 +1053,7 @@ void tst_QSGGridView::multipleChanges() delete canvas; } -void tst_QSGGridView::multipleChanges_data() +void tst_QQuickGridView::multipleChanges_data() { QTest::addColumn<int>("startCount"); QTest::addColumn<QList<ListChange> >("changes"); @@ -1204,10 +1204,10 @@ void tst_QSGGridView::multipleChanges_data() } -void tst_QSGGridView::swapWithFirstItem() +void tst_QQuickGridView::swapWithFirstItem() { // QTBUG_9697 - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -1222,7 +1222,7 @@ void tst_QSGGridView::swapWithFirstItem() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); // ensure content position is stable @@ -1233,13 +1233,13 @@ void tst_QSGGridView::swapWithFirstItem() delete canvas; } -void tst_QSGGridView::currentIndex() +void tst_QQuickGridView::currentIndex() { TestModel model; for (int i = 0; i < 60; i++) model.addItem("Item" + QString::number(i), QString::number(i)); - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setGeometry(0,0,240,320); canvas->show(); @@ -1251,15 +1251,15 @@ void tst_QSGGridView::currentIndex() qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QVERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QVERIFY(contentItem != 0); // current item should be third item QCOMPARE(gridview->currentIndex(), 35); - QCOMPARE(gridview->currentItem(), findItem<QSGItem>(contentItem, "wrapper", 35)); + QCOMPARE(gridview->currentItem(), findItem<QQuickItem>(contentItem, "wrapper", 35)); QCOMPARE(gridview->currentItem()->y(), gridview->highlightItem()->y()); QCOMPARE(gridview->contentY(), 400.0); @@ -1362,7 +1362,7 @@ void tst_QSGGridView::currentIndex() QTRY_COMPARE(gridview->contentY(), 0.0); - gridview->setFlow(QSGGridView::TopToBottom); + gridview->setFlow(QQuickGridView::TopToBottom); canvas->requestActivateWindow(); QTest::qWaitForWindowShown(canvas); @@ -1426,7 +1426,7 @@ void tst_QSGGridView::currentIndex() gridview->setHighlightFollowsCurrentItem(true); - gridview->setFlow(QSGGridView::LeftToRight); + gridview->setFlow(QQuickGridView::LeftToRight); gridview->setLayoutDirection(Qt::RightToLeft); canvas->requestActivateWindow(); @@ -1475,13 +1475,13 @@ void tst_QSGGridView::currentIndex() delete canvas; } -void tst_QSGGridView::noCurrentIndex() +void tst_QQuickGridView::noCurrentIndex() { TestModel model; for (int i = 0; i < 60; i++) model.addItem("Item" + QString::number(i), QString::number(i)); - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setGeometry(0,0,240,320); QDeclarativeContext *ctxt = canvas->rootContext(); @@ -1492,10 +1492,10 @@ void tst_QSGGridView::noCurrentIndex() qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QVERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QVERIFY(contentItem != 0); // current index should be -1 @@ -1512,9 +1512,9 @@ void tst_QSGGridView::noCurrentIndex() delete canvas; } -void tst_QSGGridView::changeFlow() +void tst_QQuickGridView::changeFlow() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; for (int i = 0; i < 30; i++) @@ -1528,24 +1528,24 @@ void tst_QSGGridView::changeFlow() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); // Confirm items positioned correctly and indexes correct - int itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + int itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal((i%3)*80)); QTRY_COMPARE(item->y(), qreal((i/3)*60)); - QSGText *name = findItem<QSGText>(contentItem, "textName", i); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", i); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(i)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", i); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", i); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(i)); } @@ -1553,17 +1553,17 @@ void tst_QSGGridView::changeFlow() ctxt->setContextProperty("testTopToBottom", QVariant(true)); // Confirm items positioned correctly and indexes correct - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal((i/5)*80)); QTRY_COMPARE(item->y(), qreal((i%5)*60)); - QSGText *name = findItem<QSGText>(contentItem, "textName", i); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", i); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(i)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", i); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", i); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(i)); } @@ -1571,17 +1571,17 @@ void tst_QSGGridView::changeFlow() ctxt->setContextProperty("testRightToLeft", QVariant(true)); // Confirm items positioned correctly and indexes correct - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal(-(i/5)*80 - item->width())); QTRY_COMPARE(item->y(), qreal((i%5)*60)); - QSGText *name = findItem<QSGText>(contentItem, "textName", i); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", i); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(i)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", i); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", i); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(i)); } @@ -1591,17 +1591,17 @@ void tst_QSGGridView::changeFlow() QTRY_COMPARE(gridview->contentX(), 0.); // Confirm items positioned correctly and indexes correct - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal(240 - (i%3+1)*80)); QTRY_COMPARE(item->y(), qreal((i/3)*60)); - QSGText *name = findItem<QSGText>(contentItem, "textName", i); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", i); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(i)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", i); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", i); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(i)); } @@ -1609,11 +1609,11 @@ void tst_QSGGridView::changeFlow() delete canvas; } -void tst_QSGGridView::defaultValues() +void tst_QQuickGridView::defaultValues() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("gridview3.qml"))); - QSGGridView *obj = qobject_cast<QSGGridView*>(c.create()); + QQuickGridView *obj = qobject_cast<QQuickGridView*>(c.create()); QTRY_VERIFY(obj != 0); QTRY_VERIFY(obj->model() == QVariant()); @@ -1632,11 +1632,11 @@ void tst_QSGGridView::defaultValues() delete obj; } -void tst_QSGGridView::properties() +void tst_QQuickGridView::properties() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("gridview2.qml"))); - QSGGridView *obj = qobject_cast<QSGGridView*>(c.create()); + QQuickGridView *obj = qobject_cast<QQuickGridView*>(c.create()); QTRY_VERIFY(obj != 0); QTRY_VERIFY(obj->model() != QVariant()); @@ -1655,13 +1655,13 @@ void tst_QSGGridView::properties() delete obj; } -void tst_QSGGridView::propertyChanges() +void tst_QQuickGridView::propertyChanges() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); QTRY_VERIFY(canvas); canvas->setSource(QUrl::fromLocalFile(TESTDATA("propertychangestest.qml"))); - QSGGridView *gridView = canvas->rootObject()->findChild<QSGGridView*>("gridView"); + QQuickGridView *gridView = canvas->rootObject()->findChild<QQuickGridView*>("gridView"); QTRY_VERIFY(gridView); QSignalSpy keyNavigationWrapsSpy(gridView, SIGNAL(keyNavigationWrapsChanged())); @@ -1671,15 +1671,15 @@ void tst_QSGGridView::propertyChanges() QTRY_COMPARE(gridView->isWrapEnabled(), true); QTRY_COMPARE(gridView->cacheBuffer(), 10); - QTRY_COMPARE(gridView->flow(), QSGGridView::LeftToRight); + QTRY_COMPARE(gridView->flow(), QQuickGridView::LeftToRight); gridView->setWrapEnabled(false); gridView->setCacheBuffer(3); - gridView->setFlow(QSGGridView::TopToBottom); + gridView->setFlow(QQuickGridView::TopToBottom); QTRY_COMPARE(gridView->isWrapEnabled(), false); QTRY_COMPARE(gridView->cacheBuffer(), 3); - QTRY_COMPARE(gridView->flow(), QSGGridView::TopToBottom); + QTRY_COMPARE(gridView->flow(), QQuickGridView::TopToBottom); QTRY_COMPARE(keyNavigationWrapsSpy.count(),1); QTRY_COMPARE(cacheBufferSpy.count(),1); @@ -1687,14 +1687,14 @@ void tst_QSGGridView::propertyChanges() gridView->setWrapEnabled(false); gridView->setCacheBuffer(3); - gridView->setFlow(QSGGridView::TopToBottom); + gridView->setFlow(QQuickGridView::TopToBottom); QTRY_COMPARE(keyNavigationWrapsSpy.count(),1); QTRY_COMPARE(cacheBufferSpy.count(),1); QTRY_COMPARE(flowSpy.count(),1); - gridView->setFlow(QSGGridView::LeftToRight); - QTRY_COMPARE(gridView->flow(), QSGGridView::LeftToRight); + gridView->setFlow(QQuickGridView::LeftToRight); + QTRY_COMPARE(gridView->flow(), QQuickGridView::LeftToRight); gridView->setWrapEnabled(true); gridView->setCacheBuffer(5); @@ -1718,23 +1718,23 @@ void tst_QSGGridView::propertyChanges() QTRY_COMPARE(layoutSpy.count(),1); QTRY_COMPARE(flowSpy.count(),2); - gridView->setFlow(QSGGridView::TopToBottom); - QTRY_COMPARE(gridView->flow(), QSGGridView::TopToBottom); + gridView->setFlow(QQuickGridView::TopToBottom); + QTRY_COMPARE(gridView->flow(), QQuickGridView::TopToBottom); QTRY_COMPARE(flowSpy.count(),3); - gridView->setFlow(QSGGridView::TopToBottom); + gridView->setFlow(QQuickGridView::TopToBottom); QTRY_COMPARE(flowSpy.count(),3); delete canvas; } -void tst_QSGGridView::componentChanges() +void tst_QQuickGridView::componentChanges() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); QTRY_VERIFY(canvas); canvas->setSource(QUrl::fromLocalFile(TESTDATA("propertychangestest.qml"))); - QSGGridView *gridView = canvas->rootObject()->findChild<QSGGridView*>("gridView"); + QQuickGridView *gridView = canvas->rootObject()->findChild<QQuickGridView*>("gridView"); QTRY_VERIFY(gridView); QDeclarativeComponent component(canvas->engine()); @@ -1776,13 +1776,13 @@ void tst_QSGGridView::componentChanges() delete canvas; } -void tst_QSGGridView::modelChanges() +void tst_QQuickGridView::modelChanges() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); QTRY_VERIFY(canvas); canvas->setSource(QUrl::fromLocalFile(TESTDATA("propertychangestest.qml"))); - QSGGridView *gridView = canvas->rootObject()->findChild<QSGGridView*>("gridView"); + QQuickGridView *gridView = canvas->rootObject()->findChild<QQuickGridView*>("gridView"); QTRY_VERIFY(gridView); QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel"); @@ -1802,9 +1802,9 @@ void tst_QSGGridView::modelChanges() delete canvas; } -void tst_QSGGridView::positionViewAtIndex() +void tst_QQuickGridView::positionViewAtIndex() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; for (int i = 0; i < 40; i++) @@ -1818,16 +1818,16 @@ void tst_QSGGridView::positionViewAtIndex() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); // Confirm items positioned correctly - int itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + int itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), (i%3)*80.); @@ -1835,14 +1835,14 @@ void tst_QSGGridView::positionViewAtIndex() } // Position on a currently visible item - gridview->positionViewAtIndex(4, QSGGridView::Beginning); + gridview->positionViewAtIndex(4, QQuickGridView::Beginning); QTRY_COMPARE(gridview->indexAt(120, 90), 4); QTRY_COMPARE(gridview->contentY(), 60.); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 3; i < model.count() && i < itemCount-3-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), (i%3)*80.); @@ -1850,14 +1850,14 @@ void tst_QSGGridView::positionViewAtIndex() } // Position on an item beyond the visible items - gridview->positionViewAtIndex(21, QSGGridView::Beginning); + gridview->positionViewAtIndex(21, QQuickGridView::Beginning); QTRY_COMPARE(gridview->indexAt(40, 450), 21); QTRY_COMPARE(gridview->contentY(), 420.); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 22; i < model.count() && i < itemCount-22-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), (i%3)*80.); @@ -1865,14 +1865,14 @@ void tst_QSGGridView::positionViewAtIndex() } // Position on an item that would leave empty space if positioned at the top - gridview->positionViewAtIndex(31, QSGGridView::Beginning); + gridview->positionViewAtIndex(31, QQuickGridView::Beginning); QTRY_COMPARE(gridview->indexAt(120, 630), 31); QTRY_COMPARE(gridview->contentY(), 520.); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 24; i < model.count() && i < itemCount-24-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), (i%3)*80.); @@ -1880,16 +1880,16 @@ void tst_QSGGridView::positionViewAtIndex() } // Position at the beginning again - gridview->positionViewAtIndex(0, QSGGridView::Beginning); + gridview->positionViewAtIndex(0, QQuickGridView::Beginning); QTRY_COMPARE(gridview->indexAt(0, 0), 0); QTRY_COMPARE(gridview->indexAt(40, 30), 0); QTRY_COMPARE(gridview->indexAt(80, 60), 4); QTRY_COMPARE(gridview->contentY(), 0.); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), (i%3)*80.); @@ -1897,53 +1897,53 @@ void tst_QSGGridView::positionViewAtIndex() } // Position at End - gridview->positionViewAtIndex(30, QSGGridView::End); + gridview->positionViewAtIndex(30, QQuickGridView::End); QTRY_COMPARE(gridview->contentY(), 340.); // Position in Center - gridview->positionViewAtIndex(15, QSGGridView::Center); + gridview->positionViewAtIndex(15, QQuickGridView::Center); QTRY_COMPARE(gridview->contentY(), 170.); // Ensure at least partially visible - gridview->positionViewAtIndex(15, QSGGridView::Visible); + gridview->positionViewAtIndex(15, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentY(), 170.); gridview->setContentY(302); - gridview->positionViewAtIndex(15, QSGGridView::Visible); + gridview->positionViewAtIndex(15, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentY(), 302.); gridview->setContentY(360); - gridview->positionViewAtIndex(15, QSGGridView::Visible); + gridview->positionViewAtIndex(15, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentY(), 300.); gridview->setContentY(60); - gridview->positionViewAtIndex(20, QSGGridView::Visible); + gridview->positionViewAtIndex(20, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentY(), 60.); gridview->setContentY(20); - gridview->positionViewAtIndex(20, QSGGridView::Visible); + gridview->positionViewAtIndex(20, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentY(), 100.); // Ensure completely visible gridview->setContentY(120); - gridview->positionViewAtIndex(20, QSGGridView::Contain); + gridview->positionViewAtIndex(20, QQuickGridView::Contain); QTRY_COMPARE(gridview->contentY(), 120.); gridview->setContentY(302); - gridview->positionViewAtIndex(15, QSGGridView::Contain); + gridview->positionViewAtIndex(15, QQuickGridView::Contain); QTRY_COMPARE(gridview->contentY(), 300.); gridview->setContentY(60); - gridview->positionViewAtIndex(20, QSGGridView::Contain); + gridview->positionViewAtIndex(20, QQuickGridView::Contain); QTRY_COMPARE(gridview->contentY(), 100.); // Test for Top To Bottom layout ctxt->setContextProperty("testTopToBottom", QVariant(true)); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), (i/5)*80.); @@ -1951,27 +1951,27 @@ void tst_QSGGridView::positionViewAtIndex() } // Position at End - gridview->positionViewAtIndex(30, QSGGridView::End); + gridview->positionViewAtIndex(30, QQuickGridView::End); QTRY_COMPARE(gridview->contentX(), 320.); QTRY_COMPARE(gridview->contentY(), 0.); // Position in Center - gridview->positionViewAtIndex(15, QSGGridView::Center); + gridview->positionViewAtIndex(15, QQuickGridView::Center); QTRY_COMPARE(gridview->contentX(), 160.); // Ensure at least partially visible - gridview->positionViewAtIndex(15, QSGGridView::Visible); + gridview->positionViewAtIndex(15, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentX(), 160.); gridview->setContentX(170); - gridview->positionViewAtIndex(25, QSGGridView::Visible); + gridview->positionViewAtIndex(25, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentX(), 170.); - gridview->positionViewAtIndex(30, QSGGridView::Visible); + gridview->positionViewAtIndex(30, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentX(), 320.); gridview->setContentX(170); - gridview->positionViewAtIndex(25, QSGGridView::Contain); + gridview->positionViewAtIndex(25, QQuickGridView::Contain); QTRY_COMPARE(gridview->contentX(), 240.); // positionViewAtBeginning @@ -2003,9 +2003,9 @@ void tst_QSGGridView::positionViewAtIndex() delete canvas; } -void tst_QSGGridView::snapping() +void tst_QQuickGridView::snapping() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; for (int i = 0; i < 40; i++) @@ -2019,41 +2019,41 @@ void tst_QSGGridView::snapping() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); gridview->setHeight(220); QCOMPARE(gridview->height(), 220.); - gridview->positionViewAtIndex(12, QSGGridView::Visible); + gridview->positionViewAtIndex(12, QQuickGridView::Visible); QCOMPARE(gridview->contentY(), 80.); gridview->setContentY(0); QCOMPARE(gridview->contentY(), 0.); - gridview->setSnapMode(QSGGridView::SnapToRow); - QCOMPARE(gridview->snapMode(), QSGGridView::SnapToRow); + gridview->setSnapMode(QQuickGridView::SnapToRow); + QCOMPARE(gridview->snapMode(), QQuickGridView::SnapToRow); - gridview->positionViewAtIndex(12, QSGGridView::Visible); + gridview->positionViewAtIndex(12, QQuickGridView::Visible); QCOMPARE(gridview->contentY(), 60.); - gridview->positionViewAtIndex(15, QSGGridView::End); + gridview->positionViewAtIndex(15, QQuickGridView::End); QCOMPARE(gridview->contentY(), 120.); delete canvas; } -void tst_QSGGridView::mirroring() +void tst_QQuickGridView::mirroring() { - QSGView *canvasA = createView(); + QQuickView *canvasA = createView(); canvasA->setSource(QUrl::fromLocalFile(TESTDATA("mirroring.qml"))); - QSGGridView *gridviewA = findItem<QSGGridView>(canvasA->rootObject(), "view"); + QQuickGridView *gridviewA = findItem<QQuickGridView>(canvasA->rootObject(), "view"); QTRY_VERIFY(gridviewA != 0); - QSGView *canvasB = createView(); + QQuickView *canvasB = createView(); canvasB->setSource(QUrl::fromLocalFile(TESTDATA("mirroring.qml"))); - QSGGridView *gridviewB = findItem<QSGGridView>(canvasB->rootObject(), "view"); + QQuickGridView *gridviewB = findItem<QQuickGridView>(canvasB->rootObject(), "view"); QTRY_VERIFY(gridviewA != 0); qApp->processEvents(); @@ -2066,48 +2066,48 @@ void tst_QSGGridView::mirroring() // LTR != RTL foreach (const QString objectName, objectNames) - QVERIFY(findItem<QSGItem>(gridviewA, objectName)->x() != findItem<QSGItem>(gridviewB, objectName)->x()); + QVERIFY(findItem<QQuickItem>(gridviewA, objectName)->x() != findItem<QQuickItem>(gridviewB, objectName)->x()); gridviewA->setProperty("layoutDirection", Qt::LeftToRight); gridviewB->setProperty("layoutDirection", Qt::LeftToRight); // LTR == LTR foreach (const QString objectName, objectNames) - QCOMPARE(findItem<QSGItem>(gridviewA, objectName)->x(), findItem<QSGItem>(gridviewB, objectName)->x()); + QCOMPARE(findItem<QQuickItem>(gridviewA, objectName)->x(), findItem<QQuickItem>(gridviewB, objectName)->x()); QVERIFY(gridviewB->layoutDirection() == gridviewB->effectiveLayoutDirection()); - QSGItemPrivate::get(gridviewB)->setLayoutMirror(true); + QQuickItemPrivate::get(gridviewB)->setLayoutMirror(true); QVERIFY(gridviewB->layoutDirection() != gridviewB->effectiveLayoutDirection()); // LTR != LTR+mirror foreach (const QString objectName, objectNames) - QVERIFY(findItem<QSGItem>(gridviewA, objectName)->x() != findItem<QSGItem>(gridviewB, objectName)->x()); + QVERIFY(findItem<QQuickItem>(gridviewA, objectName)->x() != findItem<QQuickItem>(gridviewB, objectName)->x()); gridviewA->setProperty("layoutDirection", Qt::RightToLeft); // RTL == LTR+mirror foreach (const QString objectName, objectNames) - QCOMPARE(findItem<QSGItem>(gridviewA, objectName)->x(), findItem<QSGItem>(gridviewB, objectName)->x()); + QCOMPARE(findItem<QQuickItem>(gridviewA, objectName)->x(), findItem<QQuickItem>(gridviewB, objectName)->x()); gridviewB->setProperty("layoutDirection", Qt::RightToLeft); // RTL != RTL+mirror foreach (const QString objectName, objectNames) - QVERIFY(findItem<QSGItem>(gridviewA, objectName)->x() != findItem<QSGItem>(gridviewB, objectName)->x()); + QVERIFY(findItem<QQuickItem>(gridviewA, objectName)->x() != findItem<QQuickItem>(gridviewB, objectName)->x()); gridviewA->setProperty("layoutDirection", Qt::LeftToRight); // LTR == RTL+mirror foreach (const QString objectName, objectNames) - QCOMPARE(findItem<QSGItem>(gridviewA, objectName)->x(), findItem<QSGItem>(gridviewB, objectName)->x()); + QCOMPARE(findItem<QQuickItem>(gridviewA, objectName)->x(), findItem<QQuickItem>(gridviewB, objectName)->x()); delete canvasA; delete canvasB; } -void tst_QSGGridView::positionViewAtIndex_rightToLeft() +void tst_QQuickGridView::positionViewAtIndex_rightToLeft() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; for (int i = 0; i < 40; i++) @@ -2121,16 +2121,16 @@ void tst_QSGGridView::positionViewAtIndex_rightToLeft() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); // Confirm items positioned correctly - int itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + int itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal(-(i/5)*80-item->width())); @@ -2138,13 +2138,13 @@ void tst_QSGGridView::positionViewAtIndex_rightToLeft() } // Position on a currently visible item - gridview->positionViewAtIndex(6, QSGGridView::Beginning); + gridview->positionViewAtIndex(6, QQuickGridView::Beginning); QTRY_COMPARE(gridview->contentX(), -320.); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 3; i < model.count() && i < itemCount-3-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal(-(i/5)*80-item->width())); @@ -2152,13 +2152,13 @@ void tst_QSGGridView::positionViewAtIndex_rightToLeft() } // Position on an item beyond the visible items - gridview->positionViewAtIndex(21, QSGGridView::Beginning); + gridview->positionViewAtIndex(21, QQuickGridView::Beginning); QTRY_COMPARE(gridview->contentX(), -560.); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 22; i < model.count() && i < itemCount-22-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal(-(i/5)*80-item->width())); @@ -2166,13 +2166,13 @@ void tst_QSGGridView::positionViewAtIndex_rightToLeft() } // Position on an item that would leave empty space if positioned at the top - gridview->positionViewAtIndex(31, QSGGridView::Beginning); + gridview->positionViewAtIndex(31, QQuickGridView::Beginning); QTRY_COMPARE(gridview->contentX(), -640.); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 24; i < model.count() && i < itemCount-24-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal(-(i/5)*80-item->width())); @@ -2180,13 +2180,13 @@ void tst_QSGGridView::positionViewAtIndex_rightToLeft() } // Position at the beginning again - gridview->positionViewAtIndex(0, QSGGridView::Beginning); + gridview->positionViewAtIndex(0, QQuickGridView::Beginning); QTRY_COMPARE(gridview->contentX(), -240.); // Confirm items positioned correctly - itemCount = findItems<QSGItem>(contentItem, "wrapper").count(); + itemCount = findItems<QQuickItem>(contentItem, "wrapper").count(); for (int i = 0; i < model.count() && i < itemCount-1; ++i) { - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", i); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); if (!item) qWarning() << "Item" << i << "not found"; QTRY_VERIFY(item); QTRY_COMPARE(item->x(), qreal(-(i/5)*80-item->width())); @@ -2194,52 +2194,52 @@ void tst_QSGGridView::positionViewAtIndex_rightToLeft() } // Position at End - gridview->positionViewAtIndex(30, QSGGridView::End); + gridview->positionViewAtIndex(30, QQuickGridView::End); QTRY_COMPARE(gridview->contentX(), -560.); // Position in Center - gridview->positionViewAtIndex(15, QSGGridView::Center); + gridview->positionViewAtIndex(15, QQuickGridView::Center); QTRY_COMPARE(gridview->contentX(), -400.); // Ensure at least partially visible - gridview->positionViewAtIndex(15, QSGGridView::Visible); + gridview->positionViewAtIndex(15, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentX(), -400.); gridview->setContentX(-555.); - gridview->positionViewAtIndex(15, QSGGridView::Visible); + gridview->positionViewAtIndex(15, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentX(), -555.); gridview->setContentX(-239); - gridview->positionViewAtIndex(15, QSGGridView::Visible); + gridview->positionViewAtIndex(15, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentX(), -320.); gridview->setContentX(-239); - gridview->positionViewAtIndex(20, QSGGridView::Visible); + gridview->positionViewAtIndex(20, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentX(), -400.); gridview->setContentX(-640); - gridview->positionViewAtIndex(20, QSGGridView::Visible); + gridview->positionViewAtIndex(20, QQuickGridView::Visible); QTRY_COMPARE(gridview->contentX(), -560.); // Ensure completely visible gridview->setContentX(-400); - gridview->positionViewAtIndex(20, QSGGridView::Contain); + gridview->positionViewAtIndex(20, QQuickGridView::Contain); QTRY_COMPARE(gridview->contentX(), -400.); gridview->setContentX(-315); - gridview->positionViewAtIndex(15, QSGGridView::Contain); + gridview->positionViewAtIndex(15, QQuickGridView::Contain); QTRY_COMPARE(gridview->contentX(), -320.); gridview->setContentX(-640); - gridview->positionViewAtIndex(20, QSGGridView::Contain); + gridview->positionViewAtIndex(20, QQuickGridView::Contain); QTRY_COMPARE(gridview->contentX(), -560.); delete canvas; } -void tst_QSGGridView::resetModel() +void tst_QQuickGridView::resetModel() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); QStringList strings; strings << "one" << "two" << "three"; @@ -2251,16 +2251,16 @@ void tst_QSGGridView::resetModel() canvas->setSource(QUrl::fromLocalFile(TESTDATA("displaygrid.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); QTRY_COMPARE(gridview->count(), model.rowCount()); for (int i = 0; i < model.rowCount(); ++i) { - QSGText *display = findItem<QSGText>(contentItem, "displayText", i); + QQuickText *display = findItem<QQuickText>(contentItem, "displayText", i); QTRY_VERIFY(display != 0); QTRY_COMPARE(display->text(), strings.at(i)); } @@ -2272,7 +2272,7 @@ void tst_QSGGridView::resetModel() QTRY_COMPARE(gridview->count(), model.rowCount()); for (int i = 0; i < model.rowCount(); ++i) { - QSGText *display = findItem<QSGText>(contentItem, "displayText", i); + QQuickText *display = findItem<QQuickText>(contentItem, "displayText", i); QTRY_VERIFY(display != 0); QTRY_COMPARE(display->text(), strings.at(i)); } @@ -2280,9 +2280,9 @@ void tst_QSGGridView::resetModel() delete canvas; } -void tst_QSGGridView::enforceRange() +void tst_QQuickGridView::enforceRange() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; for (int i = 0; i < 30; i++) @@ -2297,25 +2297,25 @@ void tst_QSGGridView::enforceRange() qApp->processEvents(); QVERIFY(canvas->rootObject() != 0); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); QTRY_COMPARE(gridview->preferredHighlightBegin(), 100.0); QTRY_COMPARE(gridview->preferredHighlightEnd(), 100.0); - QTRY_COMPARE(gridview->highlightRangeMode(), QSGGridView::StrictlyEnforceRange); + QTRY_COMPARE(gridview->highlightRangeMode(), QQuickGridView::StrictlyEnforceRange); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); // view should be positioned at the top of the range. - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", 0); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", 0); QTRY_VERIFY(item); QTRY_COMPARE(gridview->contentY(), -100.0); - QSGText *name = findItem<QSGText>(contentItem, "textName", 0); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", 0); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(0)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", 0); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", 0); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(0)); @@ -2336,9 +2336,9 @@ void tst_QSGGridView::enforceRange() delete canvas; } -void tst_QSGGridView::enforceRange_rightToLeft() +void tst_QQuickGridView::enforceRange_rightToLeft() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; for (int i = 0; i < 30; i++) @@ -2353,26 +2353,26 @@ void tst_QSGGridView::enforceRange_rightToLeft() qApp->processEvents(); QVERIFY(canvas->rootObject() != 0); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); QTRY_COMPARE(gridview->preferredHighlightBegin(), 100.0); QTRY_COMPARE(gridview->preferredHighlightEnd(), 100.0); - QTRY_COMPARE(gridview->highlightRangeMode(), QSGGridView::StrictlyEnforceRange); + QTRY_COMPARE(gridview->highlightRangeMode(), QQuickGridView::StrictlyEnforceRange); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); // view should be positioned at the top of the range. - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", 0); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", 0); QTRY_VERIFY(item); QTRY_COMPARE(gridview->contentX(), -100.); QTRY_COMPARE(gridview->contentY(), 0.0); - QSGText *name = findItem<QSGText>(contentItem, "textName", 0); + QQuickText *name = findItem<QQuickText>(contentItem, "textName", 0); QTRY_VERIFY(name != 0); QTRY_COMPARE(name->text(), model.name(0)); - QSGText *number = findItem<QSGText>(contentItem, "textNumber", 0); + QQuickText *number = findItem<QQuickText>(contentItem, "textNumber", 0); QTRY_VERIFY(number != 0); QTRY_COMPARE(number->text(), model.number(0)); @@ -2394,14 +2394,14 @@ void tst_QSGGridView::enforceRange_rightToLeft() delete canvas; } -void tst_QSGGridView::QTBUG_8456() +void tst_QQuickGridView::QTBUG_8456() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->setSource(QUrl::fromLocalFile(TESTDATA("setindex.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); QTRY_COMPARE(gridview->currentIndex(), 0); @@ -2409,46 +2409,46 @@ void tst_QSGGridView::QTBUG_8456() delete canvas; } -void tst_QSGGridView::manualHighlight() +void tst_QQuickGridView::manualHighlight() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); QString filename(TESTDATA("manual-highlight.qml")); canvas->setSource(QUrl::fromLocalFile(filename)); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); QTRY_COMPARE(gridview->currentIndex(), 0); - QTRY_COMPARE(gridview->currentItem(), findItem<QSGItem>(contentItem, "wrapper", 0)); + QTRY_COMPARE(gridview->currentItem(), findItem<QQuickItem>(contentItem, "wrapper", 0)); QTRY_COMPARE(gridview->highlightItem()->y() - 5, gridview->currentItem()->y()); QTRY_COMPARE(gridview->highlightItem()->x() - 5, gridview->currentItem()->x()); gridview->setCurrentIndex(2); QTRY_COMPARE(gridview->currentIndex(), 2); - QTRY_COMPARE(gridview->currentItem(), findItem<QSGItem>(contentItem, "wrapper", 2)); + QTRY_COMPARE(gridview->currentItem(), findItem<QQuickItem>(contentItem, "wrapper", 2)); QTRY_COMPARE(gridview->highlightItem()->y() - 5, gridview->currentItem()->y()); QTRY_COMPARE(gridview->highlightItem()->x() - 5, gridview->currentItem()->x()); - gridview->positionViewAtIndex(8, QSGGridView::Contain); + gridview->positionViewAtIndex(8, QQuickGridView::Contain); QTRY_COMPARE(gridview->currentIndex(), 2); - QTRY_COMPARE(gridview->currentItem(), findItem<QSGItem>(contentItem, "wrapper", 2)); + QTRY_COMPARE(gridview->currentItem(), findItem<QQuickItem>(contentItem, "wrapper", 2)); QTRY_COMPARE(gridview->highlightItem()->y() - 5, gridview->currentItem()->y()); QTRY_COMPARE(gridview->highlightItem()->x() - 5, gridview->currentItem()->x()); - gridview->setFlow(QSGGridView::TopToBottom); - QTRY_COMPARE(gridview->flow(), QSGGridView::TopToBottom); + gridview->setFlow(QQuickGridView::TopToBottom); + QTRY_COMPARE(gridview->flow(), QQuickGridView::TopToBottom); gridview->setCurrentIndex(0); QTRY_COMPARE(gridview->currentIndex(), 0); - QTRY_COMPARE(gridview->currentItem(), findItem<QSGItem>(contentItem, "wrapper", 0)); + QTRY_COMPARE(gridview->currentItem(), findItem<QQuickItem>(contentItem, "wrapper", 0)); QTRY_COMPARE(gridview->highlightItem()->y() - 5, gridview->currentItem()->y()); QTRY_COMPARE(gridview->highlightItem()->x() - 5, gridview->currentItem()->x()); @@ -2456,9 +2456,9 @@ void tst_QSGGridView::manualHighlight() } -void tst_QSGGridView::footer() +void tst_QQuickGridView::footer() { - QFETCH(QSGGridView::Flow, flow); + QFETCH(QQuickGridView::Flow, flow); QFETCH(Qt::LayoutDirection, layoutDirection); QFETCH(QPointF, initialFooterPos); QFETCH(QPointF, changedFooterPos); @@ -2467,7 +2467,7 @@ void tst_QSGGridView::footer() QFETCH(QPointF, firstDelegatePos); QFETCH(QPointF, resizeContentPos); - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -2480,15 +2480,15 @@ void tst_QSGGridView::footer() canvas->setSource(QUrl::fromLocalFile(TESTDATA("footer.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); gridview->setFlow(flow); gridview->setLayoutDirection(layoutDirection); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); - QSGText *footer = findItem<QSGText>(contentItem, "footer"); + QQuickText *footer = findItem<QQuickText>(contentItem, "footer"); QVERIFY(footer); QVERIFY(footer == gridview->footerItem()); @@ -2498,11 +2498,11 @@ void tst_QSGGridView::footer() QCOMPARE(footer->height(), 30.); QCOMPARE(QPointF(gridview->contentX(), gridview->contentY()), initialContentPos); - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", 0); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", 0); QVERIFY(item); QCOMPARE(item->pos(), firstDelegatePos); - if (flow == QSGGridView::LeftToRight) { + if (flow == QQuickGridView::LeftToRight) { // shrink by one row model.removeItem(2); QTRY_COMPARE(footer->y(), initialFooterPos.y() - gridview->cellHeight()); @@ -2521,12 +2521,12 @@ void tst_QSGGridView::footer() QPointF posWhenNoItems(0, 0); if (layoutDirection == Qt::RightToLeft) - posWhenNoItems.setX(flow == QSGGridView::LeftToRight ? gridview->width() - footer->width() : -footer->width()); + posWhenNoItems.setX(flow == QQuickGridView::LeftToRight ? gridview->width() - footer->width() : -footer->width()); QTRY_COMPARE(footer->pos(), posWhenNoItems); // if header is present, it's at a negative pos, so the footer should not move canvas->rootObject()->setProperty("showHeader", true); - QVERIFY(findItem<QSGItem>(contentItem, "header") != 0); + QVERIFY(findItem<QQuickItem>(contentItem, "header") != 0); QTRY_COMPARE(footer->pos(), posWhenNoItems); canvas->rootObject()->setProperty("showHeader", false); @@ -2539,9 +2539,9 @@ void tst_QSGGridView::footer() QCOMPARE(footerItemSpy.count(), 1); - footer = findItem<QSGText>(contentItem, "footer"); + footer = findItem<QQuickText>(contentItem, "footer"); QVERIFY(!footer); - footer = findItem<QSGText>(contentItem, "footer2"); + footer = findItem<QQuickText>(contentItem, "footer2"); QVERIFY(footer); QVERIFY(footer == gridview->footerItem()); @@ -2551,7 +2551,7 @@ void tst_QSGGridView::footer() QCOMPARE(footer->height(), 20.); QTRY_COMPARE(QPointF(gridview->contentX(), gridview->contentY()), changedContentPos); - item = findItem<QSGItem>(contentItem, "wrapper", 0); + item = findItem<QQuickItem>(contentItem, "wrapper", 0); QVERIFY(item); QCOMPARE(item->pos(), firstDelegatePos); @@ -2563,9 +2563,9 @@ void tst_QSGGridView::footer() delete canvas; } -void tst_QSGGridView::footer_data() +void tst_QQuickGridView::footer_data() { - QTest::addColumn<QSGGridView::Flow>("flow"); + QTest::addColumn<QQuickGridView::Flow>("flow"); QTest::addColumn<Qt::LayoutDirection>("layoutDirection"); QTest::addColumn<QPointF>("initialFooterPos"); QTest::addColumn<QPointF>("changedFooterPos"); @@ -2581,7 +2581,7 @@ void tst_QSGGridView::footer_data() // view height = 320 // footer below items, bottom left - QTest::newRow("flow left to right") << QSGGridView::LeftToRight << Qt::LeftToRight + QTest::newRow("flow left to right") << QQuickGridView::LeftToRight << Qt::LeftToRight << QPointF(0, 3 * 60) // 180 = height of 3 rows (cell height is 60) << QPointF(0, 10 * 60) // 30 items = 10 rows << QPointF(0, 0) @@ -2590,7 +2590,7 @@ void tst_QSGGridView::footer_data() << QPointF(0, 10 * 60 - 320 + 10); // footer below items, bottom right - QTest::newRow("flow left to right, layout right to left") << QSGGridView::LeftToRight << Qt::RightToLeft + QTest::newRow("flow left to right, layout right to left") << QQuickGridView::LeftToRight << Qt::RightToLeft << QPointF(240 - 100, 3 * 60) << QPointF((240 - 100) + 50, 10 * 60) // 50 = width diff between old and new footers << QPointF(0, 0) @@ -2599,7 +2599,7 @@ void tst_QSGGridView::footer_data() << QPointF(0, 10 * 60 - 320 + 10); // footer to right of items - QTest::newRow("flow top to bottom, layout left to right") << QSGGridView::TopToBottom << Qt::LeftToRight + QTest::newRow("flow top to bottom, layout left to right") << QQuickGridView::TopToBottom << Qt::LeftToRight << QPointF(2 * 80, 0) // 2 columns, cell width 80 << QPointF(6 * 80, 0) // 30 items = 6 columns << QPointF(0, 0) @@ -2608,7 +2608,7 @@ void tst_QSGGridView::footer_data() << QPointF(6 * 80 - 240 + 40, 0); // footer to left of items - QTest::newRow("flow top to bottom, layout right to left") << QSGGridView::TopToBottom << Qt::RightToLeft + QTest::newRow("flow top to bottom, layout right to left") << QQuickGridView::TopToBottom << Qt::RightToLeft << QPointF(-(2 * 80) - 100, 0) << QPointF(-(6 * 80) - 50, 0) // 50 = new footer width << QPointF(-240, 0) @@ -2617,9 +2617,9 @@ void tst_QSGGridView::footer_data() << QPointF(-(6 * 80) - 40, 0); } -void tst_QSGGridView::header() +void tst_QQuickGridView::header() { - QFETCH(QSGGridView::Flow, flow); + QFETCH(QQuickGridView::Flow, flow); QFETCH(Qt::LayoutDirection, layoutDirection); QFETCH(QPointF, initialHeaderPos); QFETCH(QPointF, changedHeaderPos); @@ -2632,21 +2632,21 @@ void tst_QSGGridView::header() for (int i = 0; i < 30; i++) model.addItem("Item" + QString::number(i), ""); - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->rootContext()->setContextProperty("testModel", &model); canvas->rootContext()->setContextProperty("initialViewWidth", 240); canvas->rootContext()->setContextProperty("initialViewHeight", 320); canvas->setSource(QUrl::fromLocalFile(TESTDATA("header.qml"))); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); gridview->setFlow(flow); gridview->setLayoutDirection(layoutDirection); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); - QSGText *header = findItem<QSGText>(contentItem, "header"); + QQuickText *header = findItem<QQuickText>(contentItem, "header"); QVERIFY(header); QVERIFY(header == gridview->headerItem()); @@ -2656,7 +2656,7 @@ void tst_QSGGridView::header() QCOMPARE(header->height(), 30.); QCOMPARE(QPointF(gridview->contentX(), gridview->contentY()), initialContentPos); - QSGItem *item = findItem<QSGItem>(contentItem, "wrapper", 0); + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", 0); QVERIFY(item); QCOMPARE(item->pos(), firstDelegatePos); @@ -2671,9 +2671,9 @@ void tst_QSGGridView::header() QCOMPARE(headerItemSpy.count(), 1); - header = findItem<QSGText>(contentItem, "header"); + header = findItem<QQuickText>(contentItem, "header"); QVERIFY(!header); - header = findItem<QSGText>(contentItem, "header2"); + header = findItem<QQuickText>(contentItem, "header2"); QVERIFY(header); QVERIFY(header == gridview->headerItem()); @@ -2683,7 +2683,7 @@ void tst_QSGGridView::header() QCOMPARE(header->height(), 20.); QTRY_COMPARE(QPointF(gridview->contentX(), gridview->contentY()), changedContentPos); - item = findItem<QSGItem>(contentItem, "wrapper", 0); + item = findItem<QQuickItem>(contentItem, "wrapper", 0); QVERIFY(item); QCOMPARE(item->pos(), firstDelegatePos); @@ -2702,7 +2702,7 @@ void tst_QSGGridView::header() canvas->rootContext()->setContextProperty("initialViewHeight", 320); canvas->setSource(QUrl::fromLocalFile(TESTDATA("header.qml"))); - gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); gridview->setFlow(flow); gridview->setLayoutDirection(layoutDirection); @@ -2715,9 +2715,9 @@ void tst_QSGGridView::header() delete canvas; } -void tst_QSGGridView::header_data() +void tst_QQuickGridView::header_data() { - QTest::addColumn<QSGGridView::Flow>("flow"); + QTest::addColumn<QQuickGridView::Flow>("flow"); QTest::addColumn<Qt::LayoutDirection>("layoutDirection"); QTest::addColumn<QPointF>("initialHeaderPos"); QTest::addColumn<QPointF>("changedHeaderPos"); @@ -2732,7 +2732,7 @@ void tst_QSGGridView::header_data() // view width = 240 // header above items, top left - QTest::newRow("flow left to right") << QSGGridView::LeftToRight << Qt::LeftToRight + QTest::newRow("flow left to right") << QQuickGridView::LeftToRight << Qt::LeftToRight << QPointF(0, -30) << QPointF(0, -20) << QPointF(0, -30) @@ -2741,7 +2741,7 @@ void tst_QSGGridView::header_data() << QPointF(0, -10); // header above items, top right - QTest::newRow("flow left to right, layout right to left") << QSGGridView::LeftToRight << Qt::RightToLeft + QTest::newRow("flow left to right, layout right to left") << QQuickGridView::LeftToRight << Qt::RightToLeft << QPointF(240 - 100, -30) << QPointF((240 - 100) + 50, -20) // 50 = width diff between old and new headers << QPointF(0, -30) @@ -2750,7 +2750,7 @@ void tst_QSGGridView::header_data() << QPointF(0, -10); // header to left of items - QTest::newRow("flow top to bottom, layout left to right") << QSGGridView::TopToBottom << Qt::LeftToRight + QTest::newRow("flow top to bottom, layout left to right") << QQuickGridView::TopToBottom << Qt::LeftToRight << QPointF(-100, 0) << QPointF(-50, 0) << QPointF(-100, 0) @@ -2759,7 +2759,7 @@ void tst_QSGGridView::header_data() << QPointF(-40, 0); // header to right of items - QTest::newRow("flow top to bottom, layout right to left") << QSGGridView::TopToBottom << Qt::RightToLeft + QTest::newRow("flow top to bottom, layout right to left") << QQuickGridView::TopToBottom << Qt::RightToLeft << QPointF(0, 0) << QPointF(0, 0) << QPointF(-(240 - 100), 0) @@ -2768,9 +2768,9 @@ void tst_QSGGridView::header_data() << QPointF(-(240 - 40), 0); } -void tst_QSGGridView::resizeViewAndRepaint() +void tst_QQuickGridView::resizeViewAndRepaint() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -2784,26 +2784,26 @@ void tst_QSGGridView::resizeViewAndRepaint() canvas->setSource(QUrl::fromLocalFile(TESTDATA("resizeview.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); // item at index 10 should not be currently visible - QVERIFY(!findItem<QSGItem>(contentItem, "wrapper", 10)); + QVERIFY(!findItem<QQuickItem>(contentItem, "wrapper", 10)); gridview->setHeight(320); - QTRY_VERIFY(findItem<QSGItem>(contentItem, "wrapper", 10)); + QTRY_VERIFY(findItem<QQuickItem>(contentItem, "wrapper", 10)); gridview->setHeight(100); - QTRY_VERIFY(!findItem<QSGItem>(contentItem, "wrapper", 10)); + QTRY_VERIFY(!findItem<QQuickItem>(contentItem, "wrapper", 10)); delete canvas; } -void tst_QSGGridView::indexAt() +void tst_QQuickGridView::indexAt() { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); TestModel model; model.addItem("Fred", "12345"); @@ -2822,10 +2822,10 @@ void tst_QSGGridView::indexAt() canvas->setSource(QUrl::fromLocalFile(TESTDATA("gridview1.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); QTRY_COMPARE(gridview->count(), model.count()); @@ -2839,7 +2839,7 @@ void tst_QSGGridView::indexAt() delete canvas; } -void tst_QSGGridView::onAdd() +void tst_QQuickGridView::onAdd() { QFETCH(int, initialItemCount); QFETCH(int, itemsToAdd); @@ -2847,7 +2847,7 @@ void tst_QSGGridView::onAdd() const int delegateWidth = 50; const int delegateHeight = 100; TestModel model; - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->setGeometry(0,0,5 * delegateWidth, 5 * delegateHeight); // just ensure all items fit // these initial items should not trigger GridView.onAdd @@ -2870,7 +2870,7 @@ void tst_QSGGridView::onAdd() items << qMakePair(QString("value %1").arg(i), QString::number(i)); model.addItems(items); - QTRY_COMPARE(model.count(), qobject_cast<QSGGridView*>(canvas->rootObject())->count()); + QTRY_COMPARE(model.count(), qobject_cast<QQuickGridView*>(canvas->rootObject())->count()); qApp->processEvents(); QVariantList result = object->property("addedDelegates").toList(); @@ -2881,7 +2881,7 @@ void tst_QSGGridView::onAdd() delete canvas; } -void tst_QSGGridView::onAdd_data() +void tst_QQuickGridView::onAdd_data() { QTest::addColumn<int>("initialItemCount"); QTest::addColumn<int>("itemsToAdd"); @@ -2899,7 +2899,7 @@ void tst_QSGGridView::onAdd_data() QTest::newRow("5, add 10") << 5 << 10; } -void tst_QSGGridView::onRemove() +void tst_QQuickGridView::onRemove() { QFETCH(int, initialItemCount); QFETCH(int, indexToRemove); @@ -2911,7 +2911,7 @@ void tst_QSGGridView::onRemove() for (int i=0; i<initialItemCount; i++) model.addItem(QString("value %1").arg(i), "dummy value"); - QSGView *canvas = createView(); + QQuickView *canvas = createView(); QDeclarativeContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); ctxt->setContextProperty("delegateWidth", delegateWidth); @@ -2920,13 +2920,13 @@ void tst_QSGGridView::onRemove() QObject *object = canvas->rootObject(); model.removeItems(indexToRemove, removeCount); - QTRY_COMPARE(model.count(), qobject_cast<QSGGridView*>(canvas->rootObject())->count()); + QTRY_COMPARE(model.count(), qobject_cast<QQuickGridView*>(canvas->rootObject())->count()); QCOMPARE(object->property("removedDelegateCount"), QVariant(removeCount)); delete canvas; } -void tst_QSGGridView::onRemove_data() +void tst_QQuickGridView::onRemove_data() { QTest::addColumn<int>("initialItemCount"); QTest::addColumn<int>("indexToRemove"); @@ -2949,7 +2949,7 @@ void tst_QSGGridView::onRemove_data() QTest::newRow("ten items, remove 4-10") << 10 << 4 << 6; } -void tst_QSGGridView::testQtQuick11Attributes() +void tst_QQuickGridView::testQtQuick11Attributes() { QFETCH(QString, code); QFETCH(QString, warning); @@ -2973,7 +2973,7 @@ void tst_QSGGridView::testQtQuick11Attributes() delete obj; } -void tst_QSGGridView::testQtQuick11Attributes_data() +void tst_QQuickGridView::testQtQuick11Attributes_data() { QTest::addColumn<QString>("code"); QTest::addColumn<QString>("warning"); @@ -2988,29 +2988,29 @@ void tst_QSGGridView::testQtQuick11Attributes_data() << ""; } -void tst_QSGGridView::columnCount() +void tst_QQuickGridView::columnCount() { - QSGView canvas; + QQuickView canvas; canvas.setSource(QUrl::fromLocalFile(TESTDATA("gridview4.qml"))); canvas.show(); canvas.requestActivateWindow(); QTest::qWaitForWindowShown(&canvas); - QSGGridView *view = qobject_cast<QSGGridView*>(canvas.rootObject()); + QQuickGridView *view = qobject_cast<QQuickGridView*>(canvas.rootObject()); QCOMPARE(view->cellWidth(), qreal(405)/qreal(9)); QCOMPARE(view->cellHeight(), qreal(100)); - QList<QSGItem*> items = findItems<QSGItem>(view, "delegate"); + QList<QQuickItem*> items = findItems<QQuickItem>(view, "delegate"); QCOMPARE(items.size(), 18); QCOMPARE(items.at(8)->y(), qreal(0)); QCOMPARE(items.at(9)->y(), qreal(100)); } -void tst_QSGGridView::margins() +void tst_QQuickGridView::margins() { { - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -3024,10 +3024,10 @@ void tst_QSGGridView::margins() canvas->setSource(QUrl::fromLocalFile(TESTDATA("margins.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); QCOMPARE(gridview->contentX(), -30.); @@ -3073,7 +3073,7 @@ void tst_QSGGridView::margins() } { //RTL - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->show(); TestModel model; @@ -3087,10 +3087,10 @@ void tst_QSGGridView::margins() canvas->setSource(QUrl::fromLocalFile(TESTDATA("margins.qml"))); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); QCOMPARE(gridview->contentX(), -240+30.); @@ -3137,29 +3137,29 @@ void tst_QSGGridView::margins() } } -void tst_QSGGridView::creationContext() +void tst_QQuickGridView::creationContext() { - QSGView canvas; + QQuickView canvas; canvas.setGeometry(0,0,240,320); canvas.setSource(QUrl::fromLocalFile(TESTDATA("creationContext.qml"))); qApp->processEvents(); - QSGItem *rootItem = qobject_cast<QSGItem *>(canvas.rootObject()); + QQuickItem *rootItem = qobject_cast<QQuickItem *>(canvas.rootObject()); QVERIFY(rootItem); QVERIFY(rootItem->property("count").toInt() > 0); - QSGItem *item; - QVERIFY(item = rootItem->findChild<QSGItem *>("listItem")); + QQuickItem *item; + QVERIFY(item = rootItem->findChild<QQuickItem *>("listItem")); QCOMPARE(item->property("text").toString(), QString("Hello!")); - QVERIFY(item = rootItem->findChild<QSGItem *>("header")); + QVERIFY(item = rootItem->findChild<QQuickItem *>("header")); QCOMPARE(item->property("text").toString(), QString("Hello!")); - QVERIFY(item = rootItem->findChild<QSGItem *>("footer")); + QVERIFY(item = rootItem->findChild<QQuickItem *>("footer")); QCOMPARE(item->property("text").toString(), QString("Hello!")); } -void tst_QSGGridView::snapToRow_data() +void tst_QQuickGridView::snapToRow_data() { - QTest::addColumn<QSGGridView::Flow>("flow"); + QTest::addColumn<QQuickGridView::Flow>("flow"); QTest::addColumn<Qt::LayoutDirection>("layoutDirection"); QTest::addColumn<int>("highlightRangeMode"); QTest::addColumn<QPoint>("flickStart"); @@ -3168,28 +3168,28 @@ void tst_QSGGridView::snapToRow_data() QTest::addColumn<qreal>("endExtent"); QTest::addColumn<qreal>("startExtent"); - QTest::newRow("vertical, left to right") << QSGGridView::LeftToRight << Qt::LeftToRight << int(QSGItemView::NoHighlightRange) + QTest::newRow("vertical, left to right") << QQuickGridView::LeftToRight << Qt::LeftToRight << int(QQuickItemView::NoHighlightRange) << QPoint(20, 200) << QPoint(20, 20) << 60.0 << 1200.0 << 0.0; - QTest::newRow("horizontal, left to right") << QSGGridView::TopToBottom << Qt::LeftToRight << int(QSGItemView::NoHighlightRange) + QTest::newRow("horizontal, left to right") << QQuickGridView::TopToBottom << Qt::LeftToRight << int(QQuickItemView::NoHighlightRange) << QPoint(200, 20) << QPoint(20, 20) << 60.0 << 1200.0 << 0.0; - QTest::newRow("horizontal, right to left") << QSGGridView::TopToBottom << Qt::RightToLeft << int(QSGItemView::NoHighlightRange) + QTest::newRow("horizontal, right to left") << QQuickGridView::TopToBottom << Qt::RightToLeft << int(QQuickItemView::NoHighlightRange) << QPoint(20, 20) << QPoint(200, 20) << -60.0 << -1200.0 - 240.0 << -240.0; - QTest::newRow("vertical, left to right, enforce range") << QSGGridView::LeftToRight << Qt::LeftToRight << int(QSGItemView::StrictlyEnforceRange) + QTest::newRow("vertical, left to right, enforce range") << QQuickGridView::LeftToRight << Qt::LeftToRight << int(QQuickItemView::StrictlyEnforceRange) << QPoint(20, 200) << QPoint(20, 20) << 60.0 << 1340.0 << -20.0; - QTest::newRow("horizontal, left to right, enforce range") << QSGGridView::TopToBottom << Qt::LeftToRight << int(QSGItemView::StrictlyEnforceRange) + QTest::newRow("horizontal, left to right, enforce range") << QQuickGridView::TopToBottom << Qt::LeftToRight << int(QQuickItemView::StrictlyEnforceRange) << QPoint(200, 20) << QPoint(20, 20) << 60.0 << 1340.0 << -20.0; - QTest::newRow("horizontal, right to left, enforce range") << QSGGridView::TopToBottom << Qt::RightToLeft << int(QSGItemView::StrictlyEnforceRange) + QTest::newRow("horizontal, right to left, enforce range") << QQuickGridView::TopToBottom << Qt::RightToLeft << int(QQuickItemView::StrictlyEnforceRange) << QPoint(20, 20) << QPoint(200, 20) << -60.0 << -1200.0 - 240.0 - 140.0 << -220.0; } -void tst_QSGGridView::snapToRow() +void tst_QQuickGridView::snapToRow() { - QFETCH(QSGGridView::Flow, flow); + QFETCH(QQuickGridView::Flow, flow); QFETCH(Qt::LayoutDirection, layoutDirection); QFETCH(int, highlightRangeMode); QFETCH(QPoint, flickStart); @@ -3198,26 +3198,26 @@ void tst_QSGGridView::snapToRow() QFETCH(qreal, endExtent); QFETCH(qreal, startExtent); - QSGView *canvas = createView(); + QQuickView *canvas = createView(); canvas->setSource(QUrl::fromLocalFile(TESTDATA("snapToRow.qml"))); canvas->show(); qApp->processEvents(); - QSGGridView *gridview = findItem<QSGGridView>(canvas->rootObject(), "grid"); + QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid"); QTRY_VERIFY(gridview != 0); gridview->setFlow(flow); gridview->setLayoutDirection(layoutDirection); - gridview->setHighlightRangeMode(QSGItemView::HighlightRangeMode(highlightRangeMode)); + gridview->setHighlightRangeMode(QQuickItemView::HighlightRangeMode(highlightRangeMode)); - QSGItem *contentItem = gridview->contentItem(); + QQuickItem *contentItem = gridview->contentItem(); QTRY_VERIFY(contentItem != 0); // confirm that a flick hits an item boundary flick(canvas, flickStart, flickEnd, 180); QTRY_VERIFY(gridview->isMoving() == false); // wait until it stops - if (flow == QSGGridView::LeftToRight) + if (flow == QQuickGridView::LeftToRight) QCOMPARE(qreal(fmod(gridview->contentY(),80.0)), snapAlignment); else QCOMPARE(qreal(fmod(gridview->contentX(),80.0)), snapAlignment); @@ -3226,11 +3226,11 @@ void tst_QSGGridView::snapToRow() do { flick(canvas, flickStart, flickEnd, 180); QTRY_VERIFY(gridview->isMoving() == false); // wait until it stops - } while (flow == QSGGridView::LeftToRight + } while (flow == QQuickGridView::LeftToRight ? !gridview->isAtYEnd() : layoutDirection == Qt::LeftToRight ? !gridview->isAtXEnd() : !gridview->isAtXBeginning()); - if (flow == QSGGridView::LeftToRight) + if (flow == QQuickGridView::LeftToRight) QCOMPARE(gridview->contentY(), endExtent); else QCOMPARE(gridview->contentX(), endExtent); @@ -3239,11 +3239,11 @@ void tst_QSGGridView::snapToRow() do { flick(canvas, flickEnd, flickStart, 180); QTRY_VERIFY(gridview->isMoving() == false); // wait until it stops - } while (flow == QSGGridView::LeftToRight + } while (flow == QQuickGridView::LeftToRight ? !gridview->isAtYBeginning() : layoutDirection == Qt::LeftToRight ? !gridview->isAtXBeginning() : !gridview->isAtXEnd()); - if (flow == QSGGridView::LeftToRight) + if (flow == QQuickGridView::LeftToRight) QCOMPARE(gridview->contentY(), startExtent); else QCOMPARE(gridview->contentX(), startExtent); @@ -3252,15 +3252,15 @@ void tst_QSGGridView::snapToRow() } -QSGView *tst_QSGGridView::createView() +QQuickView *tst_QQuickGridView::createView() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setGeometry(0,0,240,320); return canvas; } -void tst_QSGGridView::flick(QSGView *canvas, const QPoint &from, const QPoint &to, int duration) +void tst_QQuickGridView::flick(QQuickView *canvas, const QPoint &from, const QPoint &to, int duration) { const int pointCount = 5; QPoint diff = to - from; @@ -3283,12 +3283,12 @@ void tst_QSGGridView::flick(QSGView *canvas, const QPoint &from, const QPoint &t item must also evaluate the {index} expression equal to index */ template<typename T> -T *tst_QSGGridView::findItem(QSGItem *parent, const QString &objectName, int index) +T *tst_QQuickGridView::findItem(QQuickItem *parent, const QString &objectName, int index) { const QMetaObject &mo = T::staticMetaObject; //qDebug() << parent->childItems().count() << "children"; for (int i = 0; i < parent->childItems().count(); ++i) { - QSGItem *item = qobject_cast<QSGItem*>(parent->childItems().at(i)); + QQuickItem *item = qobject_cast<QQuickItem*>(parent->childItems().at(i)); if (!item) continue; //qDebug() << "try" << item; @@ -3313,13 +3313,13 @@ T *tst_QSGGridView::findItem(QSGItem *parent, const QString &objectName, int ind } template<typename T> -QList<T*> tst_QSGGridView::findItems(QSGItem *parent, const QString &objectName) +QList<T*> tst_QQuickGridView::findItems(QQuickItem *parent, const QString &objectName) { QList<T*> items; const QMetaObject &mo = T::staticMetaObject; //qDebug() << parent->childItems().count() << "children"; for (int i = 0; i < parent->childItems().count(); ++i) { - QSGItem *item = qobject_cast<QSGItem*>(parent->childItems().at(i)); + QQuickItem *item = qobject_cast<QQuickItem*>(parent->childItems().at(i)); if (!item) continue; //qDebug() << "try" << item; @@ -3333,11 +3333,11 @@ QList<T*> tst_QSGGridView::findItems(QSGItem *parent, const QString &objectName) return items; } -void tst_QSGGridView::dumpTree(QSGItem *parent, int depth) +void tst_QQuickGridView::dumpTree(QQuickItem *parent, int depth) { static QString padding(" "); for (int i = 0; i < parent->childItems().count(); ++i) { - QSGItem *item = qobject_cast<QSGItem*>(parent->childItems().at(i)); + QQuickItem *item = qobject_cast<QQuickItem*>(parent->childItems().at(i)); if (!item) continue; QDeclarativeContext *context = QDeclarativeEngine::contextForObject(item); @@ -3347,7 +3347,7 @@ void tst_QSGGridView::dumpTree(QSGItem *parent, int depth) } -QTEST_MAIN(tst_QSGGridView) +QTEST_MAIN(tst_QQuickGridView) -#include "tst_qsggridview.moc" +#include "tst_qquickgridview.moc" diff --git a/tests/auto/declarative/qsgimage/data/aspectratio.qml b/tests/auto/declarative/qquickimage/data/aspectratio.qml index b26f0e1f04..b26f0e1f04 100644 --- a/tests/auto/declarative/qsgimage/data/aspectratio.qml +++ b/tests/auto/declarative/qquickimage/data/aspectratio.qml diff --git a/tests/auto/declarative/qsgimage/data/big.jpeg b/tests/auto/declarative/qquickimage/data/big.jpeg Binary files differindex bed7bd65c3..bed7bd65c3 100644 --- a/tests/auto/declarative/qsgimage/data/big.jpeg +++ b/tests/auto/declarative/qquickimage/data/big.jpeg diff --git a/tests/auto/declarative/qsgimage/data/big256.png b/tests/auto/declarative/qquickimage/data/big256.png Binary files differindex 1dc1596d03..1dc1596d03 100644 --- a/tests/auto/declarative/qsgimage/data/big256.png +++ b/tests/auto/declarative/qquickimage/data/big256.png diff --git a/tests/auto/declarative/qsgimage/data/colors.png b/tests/auto/declarative/qquickimage/data/colors.png Binary files differindex dfb62f3d64..dfb62f3d64 100644 --- a/tests/auto/declarative/qsgimage/data/colors.png +++ b/tests/auto/declarative/qquickimage/data/colors.png diff --git a/tests/auto/declarative/qsgimage/data/colors1.png b/tests/auto/declarative/qquickimage/data/colors1.png Binary files differindex dfb62f3d64..dfb62f3d64 100644 --- a/tests/auto/declarative/qsgimage/data/colors1.png +++ b/tests/auto/declarative/qquickimage/data/colors1.png diff --git a/tests/auto/declarative/qsgimage/data/green.png b/tests/auto/declarative/qquickimage/data/green.png Binary files differindex 0a2e153ba1..0a2e153ba1 100644 --- a/tests/auto/declarative/qsgimage/data/green.png +++ b/tests/auto/declarative/qquickimage/data/green.png diff --git a/tests/auto/declarative/qsgimage/data/heart-win32.png b/tests/auto/declarative/qquickimage/data/heart-win32.png Binary files differindex 351da13772..351da13772 100644 --- a/tests/auto/declarative/qsgimage/data/heart-win32.png +++ b/tests/auto/declarative/qquickimage/data/heart-win32.png diff --git a/tests/auto/declarative/qsgimage/data/heart.png b/tests/auto/declarative/qquickimage/data/heart.png Binary files differindex abe97fee4b..abe97fee4b 100644 --- a/tests/auto/declarative/qsgimage/data/heart.png +++ b/tests/auto/declarative/qquickimage/data/heart.png diff --git a/tests/auto/declarative/qsgimage/data/heart.svg b/tests/auto/declarative/qquickimage/data/heart.svg index 8c982cd93c..8c982cd93c 100644 --- a/tests/auto/declarative/qsgimage/data/heart.svg +++ b/tests/auto/declarative/qquickimage/data/heart.svg diff --git a/tests/auto/declarative/qsgimage/data/heart200-win32.png b/tests/auto/declarative/qquickimage/data/heart200-win32.png Binary files differindex 4976ff98ba..4976ff98ba 100644 --- a/tests/auto/declarative/qsgimage/data/heart200-win32.png +++ b/tests/auto/declarative/qquickimage/data/heart200-win32.png diff --git a/tests/auto/declarative/qsgimage/data/heart200.png b/tests/auto/declarative/qquickimage/data/heart200.png Binary files differindex 7fbb13c5bb..7fbb13c5bb 100644 --- a/tests/auto/declarative/qsgimage/data/heart200.png +++ b/tests/auto/declarative/qquickimage/data/heart200.png diff --git a/tests/auto/declarative/qsgimage/data/htiling.qml b/tests/auto/declarative/qquickimage/data/htiling.qml index f192f931c9..f192f931c9 100644 --- a/tests/auto/declarative/qsgimage/data/htiling.qml +++ b/tests/auto/declarative/qquickimage/data/htiling.qml diff --git a/tests/auto/declarative/qsgimage/data/mirror.qml b/tests/auto/declarative/qquickimage/data/mirror.qml index 98fddf083e..98fddf083e 100644 --- a/tests/auto/declarative/qsgimage/data/mirror.qml +++ b/tests/auto/declarative/qquickimage/data/mirror.qml diff --git a/tests/auto/declarative/qsgimage/data/nullpixmap.qml b/tests/auto/declarative/qquickimage/data/nullpixmap.qml index d52f41f164..d52f41f164 100644 --- a/tests/auto/declarative/qsgimage/data/nullpixmap.qml +++ b/tests/auto/declarative/qquickimage/data/nullpixmap.qml diff --git a/tests/auto/declarative/qsgimage/data/pattern.png b/tests/auto/declarative/qquickimage/data/pattern.png Binary files differindex d3d5e1e007..d3d5e1e007 100644 --- a/tests/auto/declarative/qsgimage/data/pattern.png +++ b/tests/auto/declarative/qquickimage/data/pattern.png diff --git a/tests/auto/declarative/qsgimage/data/qtbug_16389.qml b/tests/auto/declarative/qquickimage/data/qtbug_16389.qml index 7b8adecb11..7b8adecb11 100644 --- a/tests/auto/declarative/qsgimage/data/qtbug_16389.qml +++ b/tests/auto/declarative/qquickimage/data/qtbug_16389.qml diff --git a/tests/auto/declarative/qsgimage/data/rect.png b/tests/auto/declarative/qquickimage/data/rect.png Binary files differindex d564a2d5a5..d564a2d5a5 100644 --- a/tests/auto/declarative/qsgimage/data/rect.png +++ b/tests/auto/declarative/qquickimage/data/rect.png diff --git a/tests/auto/declarative/qsgimage/data/vtiling.qml b/tests/auto/declarative/qquickimage/data/vtiling.qml index f730f6e050..f730f6e050 100644 --- a/tests/auto/declarative/qsgimage/data/vtiling.qml +++ b/tests/auto/declarative/qquickimage/data/vtiling.qml diff --git a/tests/auto/declarative/qsgimage/qsgimage.pro b/tests/auto/declarative/qquickimage/qquickimage.pro index 11abb9fa18..46cbdb49aa 100644 --- a/tests/auto/declarative/qsgimage/qsgimage.pro +++ b/tests/auto/declarative/qquickimage/qquickimage.pro @@ -1,9 +1,9 @@ CONFIG += testcase -TARGET = tst_qsgimage +TARGET = tst_qquickimage macx:CONFIG -= app_bundle HEADERS += ../shared/testhttpserver.h -SOURCES += tst_qsgimage.cpp ../shared/testhttpserver.cpp +SOURCES += tst_qquickimage.cpp ../shared/testhttpserver.cpp testDataFiles.files = data testDataFiles.path = . diff --git a/tests/auto/declarative/qsgimage/tst_qsgimage.cpp b/tests/auto/declarative/qquickimage/tst_qquickimage.cpp index d0125e6582..3d7ee07d56 100644 --- a/tests/auto/declarative/qsgimage/tst_qsgimage.cpp +++ b/tests/auto/declarative/qquickimage/tst_qquickimage.cpp @@ -46,10 +46,10 @@ #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/qsgview.h> -#include <private/qsgimage_p.h> -#include <private/qsgimagebase_p.h> -#include <private/qsgloader_p.h> +#include <QtDeclarative/qquickview.h> +#include <private/qquickimage_p.h> +#include <private/qquickimagebase_p.h> +#include <private/qquickloader_p.h> #include <QtDeclarative/qdeclarativecontext.h> #include <QtDeclarative/qdeclarativeexpression.h> #include <QtTest/QSignalSpy> @@ -62,11 +62,11 @@ #define SERVER_PORT 14451 #define SERVER_ADDR "http://127.0.0.1:14451" -class tst_qsgimage : public QObject +class tst_qquickimage : public QObject { Q_OBJECT public: - tst_qsgimage(); + tst_qquickimage(); private slots: void noSource(); @@ -91,33 +91,33 @@ private slots: private: template<typename T> - T *findItem(QSGItem *parent, const QString &id, int index=-1); + T *findItem(QQuickItem *parent, const QString &id, int index=-1); QDeclarativeEngine engine; }; -tst_qsgimage::tst_qsgimage() +tst_qquickimage::tst_qquickimage() { } -void tst_qsgimage::noSource() +void tst_qquickimage::noSource() { QString componentStr = "import QtQuick 2.0\nImage { source: \"\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->source(), QUrl()); - QVERIFY(obj->status() == QSGImage::Null); + QVERIFY(obj->status() == QQuickImage::Null); QCOMPARE(obj->width(), 0.); QCOMPARE(obj->height(), 0.); - QCOMPARE(obj->fillMode(), QSGImage::Stretch); + QCOMPARE(obj->fillMode(), QQuickImage::Stretch); QCOMPARE(obj->progress(), 0.0); delete obj; } -void tst_qsgimage::imageSource_data() +void tst_qquickimage::imageSource_data() { QTest::addColumn<QString>("source"); QTest::addColumn<double>("width"); @@ -144,7 +144,7 @@ void tst_qsgimage::imageSource_data() } -void tst_qsgimage::imageSource() +void tst_qquickimage::imageSource() { QFETCH(QString, source); QFETCH(double, width); @@ -169,7 +169,7 @@ void tst_qsgimage::imageSource() + (cache ? QLatin1String("true") : QLatin1String("false")) + " }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); if (async) @@ -183,40 +183,40 @@ void tst_qsgimage::imageSource() QVERIFY(obj->cache() == false); if (remote || async) - QTRY_VERIFY(obj->status() == QSGImage::Loading); + QTRY_VERIFY(obj->status() == QQuickImage::Loading); QCOMPARE(obj->source(), remote ? source : QUrl(source)); if (error.isEmpty()) { - QTRY_VERIFY(obj->status() == QSGImage::Ready); + QTRY_VERIFY(obj->status() == QQuickImage::Ready); QCOMPARE(obj->width(), qreal(width)); QCOMPARE(obj->height(), qreal(height)); - QCOMPARE(obj->fillMode(), QSGImage::Stretch); + QCOMPARE(obj->fillMode(), QQuickImage::Stretch); QCOMPARE(obj->progress(), 1.0); } else { - QTRY_VERIFY(obj->status() == QSGImage::Error); + QTRY_VERIFY(obj->status() == QQuickImage::Error); } delete obj; } -void tst_qsgimage::clearSource() +void tst_qquickimage::clearSource() { QString componentStr = "import QtQuick 2.0\nImage { source: srcImage }"; QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(TESTDATA("colors.png"))); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); - QVERIFY(obj->status() == QSGImage::Ready); + QVERIFY(obj->status() == QQuickImage::Ready); QCOMPARE(obj->width(), 120.); QCOMPARE(obj->height(), 120.); QCOMPARE(obj->progress(), 1.0); ctxt->setContextProperty("srcImage", ""); QVERIFY(obj->source().isEmpty()); - QVERIFY(obj->status() == QSGImage::Null); + QVERIFY(obj->status() == QQuickImage::Null); QCOMPARE(obj->width(), 0.); QCOMPARE(obj->height(), 0.); QCOMPARE(obj->progress(), 0.0); @@ -224,34 +224,34 @@ void tst_qsgimage::clearSource() delete obj; } -void tst_qsgimage::resized() +void tst_qquickimage::resized() { QString componentStr = "import QtQuick 2.0\nImage { source: \"" + TESTDATA("colors.png") + "\"; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 300.); - QCOMPARE(obj->fillMode(), QSGImage::Stretch); + QCOMPARE(obj->fillMode(), QQuickImage::Stretch); delete obj; } -void tst_qsgimage::preserveAspectRatio() +void tst_qquickimage::preserveAspectRatio() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->show(); canvas->setSource(QUrl::fromLocalFile(TESTDATA("aspectratio.qml"))); - QSGImage *image = qobject_cast<QSGImage*>(canvas->rootObject()); + QQuickImage *image = qobject_cast<QQuickImage*>(canvas->rootObject()); QVERIFY(image != 0); image->setWidth(80.0); QCOMPARE(image->width(), 80.); QCOMPARE(image->height(), 80.); canvas->setSource(QUrl::fromLocalFile(TESTDATA("aspectratio.qml"))); - image = qobject_cast<QSGImage*>(canvas->rootObject()); + image = qobject_cast<QQuickImage*>(canvas->rootObject()); image->setHeight(60.0); QVERIFY(image != 0); QCOMPARE(image->height(), 60.); @@ -259,36 +259,36 @@ void tst_qsgimage::preserveAspectRatio() delete canvas; } -void tst_qsgimage::smooth() +void tst_qquickimage::smooth() { QString componentStr = "import QtQuick 2.0\nImage { source: \"" + TESTDATA("colors.png") + "\"; smooth: true; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 300.); QCOMPARE(obj->smooth(), true); - QCOMPARE(obj->fillMode(), QSGImage::Stretch); + QCOMPARE(obj->fillMode(), QQuickImage::Stretch); delete obj; } -void tst_qsgimage::mirror() +void tst_qquickimage::mirror() { - QMap<QSGImage::FillMode, QImage> screenshots; - QList<QSGImage::FillMode> fillModes; - fillModes << QSGImage::Stretch << QSGImage::PreserveAspectFit << QSGImage::PreserveAspectCrop - << QSGImage::Tile << QSGImage::TileVertically << QSGImage::TileHorizontally; + QMap<QQuickImage::FillMode, QImage> screenshots; + QList<QQuickImage::FillMode> fillModes; + fillModes << QQuickImage::Stretch << QQuickImage::PreserveAspectFit << QQuickImage::PreserveAspectCrop + << QQuickImage::Tile << QQuickImage::TileVertically << QQuickImage::TileHorizontally; qreal width = 300; qreal height = 250; - foreach (QSGImage::FillMode fillMode, fillModes) { - QSGView *canvas = new QSGView; + foreach (QQuickImage::FillMode fillMode, fillModes) { + QQuickView *canvas = new QQuickView; canvas->setSource(QUrl::fromLocalFile(TESTDATA("mirror.qml"))); - QSGImage *obj = canvas->rootObject()->findChild<QSGImage*>("image"); + QQuickImage *obj = canvas->rootObject()->findChild<QQuickImage*>("image"); QVERIFY(obj != 0); obj->setFillMode(fillMode); @@ -300,7 +300,7 @@ void tst_qsgimage::mirror() delete canvas; } - foreach (QSGImage::FillMode fillMode, fillModes) { + foreach (QQuickImage::FillMode fillMode, fillModes) { QPixmap srcPixmap; QVERIFY(srcPixmap.load(TESTDATA("pattern.png"))); @@ -312,13 +312,13 @@ void tst_qsgimage::mirror() p_e.setTransform(transform); switch (fillMode) { - case QSGImage::Stretch: + case QQuickImage::Stretch: p_e.drawPixmap(QRect(0, 0, width, height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); break; - case QSGImage::PreserveAspectFit: + case QQuickImage::PreserveAspectFit: p_e.drawPixmap(QRect(25, 0, height, height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); break; - case QSGImage::PreserveAspectCrop: + case QQuickImage::PreserveAspectCrop: { qreal ratio = width/srcPixmap.width(); // width is the longer side QRect rect(0, 0, srcPixmap.width()*ratio, srcPixmap.height()*ratio); @@ -326,15 +326,15 @@ void tst_qsgimage::mirror() p_e.drawPixmap(rect, srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); break; } - case QSGImage::Tile: + case QQuickImage::Tile: p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); break; - case QSGImage::TileVertically: + case QQuickImage::TileVertically: transform.scale(width / srcPixmap.width(), 1.0); p_e.setTransform(transform); p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); break; - case QSGImage::TileHorizontally: + case QQuickImage::TileHorizontally: transform.scale(1.0, height / srcPixmap.height()); p_e.setTransform(transform); p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); @@ -349,7 +349,7 @@ void tst_qsgimage::mirror() } } -void tst_qsgimage::svg() +void tst_qquickimage::svg() { if (!QImageReader::supportedImageFormats().contains("svg")) QSKIP("svg support not available"); @@ -358,7 +358,7 @@ void tst_qsgimage::svg() QString componentStr = "import QtQuick 2.0\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.0); QCOMPARE(obj->height(), 300.0); @@ -369,7 +369,7 @@ void tst_qsgimage::svg() delete obj; } -void tst_qsgimage::geometry_data() +void tst_qquickimage::geometry_data() { QTest::addColumn<QString>("fillMode"); QTest::addColumn<bool>("explicitWidth"); @@ -406,7 +406,7 @@ void tst_qsgimage::geometry_data() } } -void tst_qsgimage::geometry() +void tst_qquickimage::geometry() { QFETCH(QString, fillMode); QFETCH(bool, explicitWidth); @@ -428,7 +428,7 @@ void tst_qsgimage::geometry() componentStr.append("}"); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), itemWidth); @@ -441,7 +441,7 @@ void tst_qsgimage::geometry() delete obj; } -void tst_qsgimage::big() +void tst_qquickimage::big() { // If the JPEG loader does not implement scaling efficiently, it would // have to build a 400 MB image. That would be a bug in the JPEG loader. @@ -451,7 +451,7 @@ void tst_qsgimage::big() QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 100.0); QCOMPARE(obj->height(), 256.0); @@ -459,16 +459,16 @@ void tst_qsgimage::big() delete obj; } -void tst_qsgimage::tiling_QTBUG_6716() +void tst_qquickimage::tiling_QTBUG_6716() { QFETCH(QString, source); - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA(source))); canvas->show(); qApp->processEvents(); - QSGImage *tiling = findItem<QSGImage>(canvas->rootObject(), "tiling"); + QQuickImage *tiling = findItem<QQuickImage>(canvas->rootObject(), "tiling"); QVERIFY(tiling != 0); QImage img = canvas->grabFrameBuffer(); @@ -481,14 +481,14 @@ void tst_qsgimage::tiling_QTBUG_6716() delete canvas; } -void tst_qsgimage::tiling_QTBUG_6716_data() +void tst_qquickimage::tiling_QTBUG_6716_data() { QTest::addColumn<QString>("source"); QTest::newRow("vertical_tiling") << "vtiling.qml"; QTest::newRow("horizontal_tiling") << "htiling.qml"; } -void tst_qsgimage::noLoading() +void tst_qquickimage::noLoading() { TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); @@ -500,17 +500,17 @@ void tst_qsgimage::noLoading() ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(TESTDATA("heart.png"))); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); - QVERIFY(obj->status() == QSGImage::Ready); + QVERIFY(obj->status() == QQuickImage::Ready); QSignalSpy sourceSpy(obj, SIGNAL(sourceChanged(const QUrl &))); QSignalSpy progressSpy(obj, SIGNAL(progressChanged(qreal))); - QSignalSpy statusSpy(obj, SIGNAL(statusChanged(QSGImageBase::Status))); + QSignalSpy statusSpy(obj, SIGNAL(statusChanged(QQuickImageBase::Status))); // Loading local file ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(TESTDATA("green.png"))); - QTRY_VERIFY(obj->status() == QSGImage::Ready); + QTRY_VERIFY(obj->status() == QQuickImage::Ready); QTRY_VERIFY(obj->progress() == 1.0); QTRY_COMPARE(sourceSpy.count(), 1); QTRY_COMPARE(progressSpy.count(), 0); @@ -518,9 +518,9 @@ void tst_qsgimage::noLoading() // Loading remote file ctxt->setContextProperty("srcImage", QString(SERVER_ADDR) + "/rect.png"); - QTRY_VERIFY(obj->status() == QSGImage::Loading); + QTRY_VERIFY(obj->status() == QQuickImage::Loading); QTRY_VERIFY(obj->progress() == 0.0); - QTRY_VERIFY(obj->status() == QSGImage::Ready); + QTRY_VERIFY(obj->status() == QQuickImage::Ready); QTRY_VERIFY(obj->progress() == 1.0); QTRY_COMPARE(sourceSpy.count(), 2); QTRY_COMPARE(progressSpy.count(), 2); @@ -529,7 +529,7 @@ void tst_qsgimage::noLoading() // Loading remote file again - should not go through 'Loading' state. ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(TESTDATA("green.png"))); ctxt->setContextProperty("srcImage", QString(SERVER_ADDR) + "/rect.png"); - QTRY_VERIFY(obj->status() == QSGImage::Ready); + QTRY_VERIFY(obj->status() == QQuickImage::Ready); QTRY_VERIFY(obj->progress() == 1.0); QTRY_COMPARE(sourceSpy.count(), 4); QTRY_COMPARE(progressSpy.count(), 2); @@ -538,7 +538,7 @@ void tst_qsgimage::noLoading() delete obj; } -void tst_qsgimage::paintedWidthHeight() +void tst_qquickimage::paintedWidthHeight() { { QString src = QUrl::fromLocalFile(TESTDATA("heart.png")).toString(); @@ -546,7 +546,7 @@ void tst_qsgimage::paintedWidthHeight() QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 200.0); QCOMPARE(obj->height(), 25.0); @@ -561,7 +561,7 @@ void tst_qsgimage::paintedWidthHeight() QString componentStr = "import QtQuick 2.0\nImage { source: \"" + src + "\"; width: 26; height: 175; fillMode: Image.PreserveAspectFit }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QVERIFY(obj != 0); QCOMPARE(obj->width(), 26.0); QCOMPARE(obj->height(), 175.0); @@ -572,19 +572,19 @@ void tst_qsgimage::paintedWidthHeight() } } -void tst_qsgimage::sourceSize_QTBUG_14303() +void tst_qquickimage::sourceSize_QTBUG_14303() { QString componentStr = "import QtQuick 2.0\nImage { source: srcImage }"; QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(TESTDATA("heart200.png"))); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); - QSGImage *obj = qobject_cast<QSGImage*>(component.create()); + QQuickImage *obj = qobject_cast<QQuickImage*>(component.create()); QSignalSpy sourceSizeSpy(obj, SIGNAL(sourceSizeChanged())); QTRY_VERIFY(obj != 0); - QTRY_VERIFY(obj->status() == QSGImage::Ready); + QTRY_VERIFY(obj->status() == QQuickImage::Ready); QTRY_COMPARE(obj->sourceSize().width(), 200); QTRY_COMPARE(obj->sourceSize().height(), 200); @@ -603,15 +603,15 @@ void tst_qsgimage::sourceSize_QTBUG_14303() delete obj; } -void tst_qsgimage::sourceSize_QTBUG_16389() +void tst_qquickimage::sourceSize_QTBUG_16389() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("qtbug_16389.qml"))); canvas->show(); qApp->processEvents(); - QSGImage *image = findItem<QSGImage>(canvas->rootObject(), "iconImage"); - QSGItem *handle = findItem<QSGItem>(canvas->rootObject(), "blueHandle"); + QQuickImage *image = findItem<QQuickImage>(canvas->rootObject(), "iconImage"); + QQuickItem *handle = findItem<QQuickItem>(canvas->rootObject(), "blueHandle"); QCOMPARE(image->sourceSize().width(), 200); QCOMPARE(image->sourceSize().height(), 200); @@ -634,13 +634,13 @@ static void checkWarnings(QtMsgType, const char *msg) } // QTBUG-15690 -void tst_qsgimage::nullPixmapPaint() +void tst_qquickimage::nullPixmapPaint() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("nullpixmap.qml"))); canvas->show(); - QSGImage *image = qobject_cast<QSGImage*>(canvas->rootObject()); + QQuickImage *image = qobject_cast<QQuickImage*>(canvas->rootObject()); QTRY_VERIFY(image != 0); image->setSource(SERVER_ADDR + QString("/no-such-file.png")); @@ -658,12 +658,12 @@ void tst_qsgimage::nullPixmapPaint() item must also evaluate the {index} expression equal to index */ template<typename T> -T *tst_qsgimage::findItem(QSGItem *parent, const QString &objectName, int index) +T *tst_qquickimage::findItem(QQuickItem *parent, const QString &objectName, int index) { const QMetaObject &mo = T::staticMetaObject; //qDebug() << parent->childItems().count() << "children"; for (int i = 0; i < parent->childItems().count(); ++i) { - QSGItem *item = qobject_cast<QSGItem*>(parent->childItems().at(i)); + QQuickItem *item = qobject_cast<QQuickItem*>(parent->childItems().at(i)); if (!item) continue; //qDebug() << "try" << item; @@ -684,6 +684,6 @@ T *tst_qsgimage::findItem(QSGItem *parent, const QString &objectName, int index) return 0; } -QTEST_MAIN(tst_qsgimage) +QTEST_MAIN(tst_qquickimage) -#include "tst_qsgimage.moc" +#include "tst_qquickimage.moc" diff --git a/tests/auto/declarative/qsgitem/qsgitem.pro b/tests/auto/declarative/qquickitem/qquickitem.pro index 76d6547da7..c1c7b825f9 100644 --- a/tests/auto/declarative/qsgitem/qsgitem.pro +++ b/tests/auto/declarative/qquickitem/qquickitem.pro @@ -1,6 +1,6 @@ CONFIG += testcase -TARGET = tst_qsgitem -SOURCES += tst_qsgitem.cpp +TARGET = tst_qquickitem +SOURCES += tst_qquickitem.cpp macx:CONFIG -= app_bundle diff --git a/tests/auto/declarative/qsgitem/tst_qsgitem.cpp b/tests/auto/declarative/qquickitem/tst_qquickitem.cpp index 84c52bdde8..694fdc0b0c 100644 --- a/tests/auto/declarative/qsgitem/tst_qsgitem.cpp +++ b/tests/auto/declarative/qquickitem/tst_qquickitem.cpp @@ -41,18 +41,18 @@ #include <qtest.h> -#include "qsgitem.h" -#include "qsgcanvas.h" +#include "qquickitem.h" +#include "qquickcanvas.h" #include <QtWidgets/QGraphicsSceneMouseEvent> -#include "private/qsgfocusscope_p.h" +#include "private/qquickfocusscope_p.h" #include <QDebug> #include <QTimer> -class TestItem : public QSGItem +class TestItem : public QQuickItem { Q_OBJECT public: - TestItem(QSGItem *parent = 0) : QSGItem(parent), focused(false), pressCount(0), releaseCount(0), wheelCount(0) {} + TestItem(QQuickItem *parent = 0) : QQuickItem(parent), focused(false), pressCount(0), releaseCount(0), wheelCount(0) {} bool focused; int pressCount; @@ -66,12 +66,12 @@ protected: virtual void wheelEvent(QWheelEvent *event) { event->accept(); ++wheelCount; } }; -class TestPolishItem : public QSGItem +class TestPolishItem : public QQuickItem { Q_OBJECT public: - TestPolishItem(QSGItem *parent) - : QSGItem(parent), wasPolished(false) { + TestPolishItem(QQuickItem *parent) + : QQuickItem(parent), wasPolished(false) { QTimer::singleShot(10, this, SLOT(doPolish())); } @@ -88,11 +88,11 @@ public slots: } }; -class TestFocusScope : public QSGFocusScope +class TestFocusScope : public QQuickFocusScope { Q_OBJECT public: - TestFocusScope(QSGItem *parent = 0) : QSGFocusScope(parent), focused(false) {} + TestFocusScope(QQuickItem *parent = 0) : QQuickFocusScope(parent), focused(false) {} bool focused; protected: @@ -100,11 +100,11 @@ protected: virtual void focusOutEvent(QFocusEvent *) { Q_ASSERT(focused); focused = false; } }; -class tst_qsgitem : public QObject +class tst_qquickitem : public QObject { Q_OBJECT public: - tst_qsgitem(); + tst_qquickitem(); private slots: void initTestCase(); @@ -145,26 +145,26 @@ private: } }; -tst_qsgitem::tst_qsgitem() +tst_qquickitem::tst_qquickitem() { } -void tst_qsgitem::initTestCase() +void tst_qquickitem::initTestCase() { } -void tst_qsgitem::cleanupTestCase() +void tst_qquickitem::cleanupTestCase() { } // Focus has no effect when outside a canvas -void tst_qsgitem::noCanvas() +void tst_qquickitem::noCanvas() { - QSGItem *root = new TestItem; - QSGItem *child = new TestItem(root); - QSGItem *scope = new TestItem(root); - QSGFocusScope *scopedChild = new TestFocusScope(scope); - QSGFocusScope *scopedChild2 = new TestFocusScope(scope); + QQuickItem *root = new TestItem; + QQuickItem *child = new TestItem(root); + QQuickItem *scope = new TestItem(root); + QQuickFocusScope *scopedChild = new TestFocusScope(scope); + QQuickFocusScope *scopedChild2 = new TestFocusScope(scope); QCOMPARE(root->hasFocus(), false); QCOMPARE(child->hasFocus(), false); @@ -201,18 +201,18 @@ struct FocusData { bool focus; bool activeFocus; }; -struct FocusState : public QHash<QSGItem *, FocusData> +struct FocusState : public QHash<QQuickItem *, FocusData> { FocusState() : activeFocusItem(0) {} - FocusState &operator<<(QSGItem *item) { + FocusState &operator<<(QQuickItem *item) { insert(item, FocusData()); return *this; } - void active(QSGItem *i) { + void active(QQuickItem *i) { activeFocusItem = i; } - QSGItem *activeFocusItem; + QQuickItem *activeFocusItem; }; #define FVERIFY() \ @@ -226,7 +226,7 @@ struct FocusState : public QHash<QSGItem *, FocusData> } else { \ QCOMPARE(canvas.activeFocusItem(), canvas.rootItem()); \ } \ - for (QHash<QSGItem *, FocusData>::Iterator iter = focusState.begin(); \ + for (QHash<QQuickItem *, FocusData>::Iterator iter = focusState.begin(); \ iter != focusState.end(); \ iter++) { \ QCOMPARE(iter.key()->hasFocus(), iter.value().focus); \ @@ -235,18 +235,18 @@ struct FocusState : public QHash<QSGItem *, FocusData> } while (false) // Tests a simple set of top-level scoped items -void tst_qsgitem::simpleFocus() +void tst_qquickitem::simpleFocus() { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *l1c1 = new TestItem(canvas.rootItem()); - QSGItem *l1c2 = new TestItem(canvas.rootItem()); - QSGItem *l1c3 = new TestItem(canvas.rootItem()); + QQuickItem *l1c1 = new TestItem(canvas.rootItem()); + QQuickItem *l1c2 = new TestItem(canvas.rootItem()); + QQuickItem *l1c3 = new TestItem(canvas.rootItem()); - QSGItem *l2c1 = new TestItem(l1c1); - QSGItem *l2c2 = new TestItem(l1c1); - QSGItem *l2c3 = new TestItem(l1c3); + QQuickItem *l2c1 = new TestItem(l1c1); + QQuickItem *l2c2 = new TestItem(l1c1); + QQuickItem *l2c3 = new TestItem(l1c3); FocusState focusState; focusState << l1c1 << l1c2 << l1c3 @@ -285,24 +285,24 @@ void tst_qsgitem::simpleFocus() } // Items with a focus scope -void tst_qsgitem::scopedFocus() +void tst_qquickitem::scopedFocus() { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *l1c1 = new TestItem(canvas.rootItem()); - QSGItem *l1c2 = new TestItem(canvas.rootItem()); - QSGItem *l1c3 = new TestItem(canvas.rootItem()); + QQuickItem *l1c1 = new TestItem(canvas.rootItem()); + QQuickItem *l1c2 = new TestItem(canvas.rootItem()); + QQuickItem *l1c3 = new TestItem(canvas.rootItem()); - QSGItem *l2c1 = new TestItem(l1c1); - QSGItem *l2c2 = new TestItem(l1c1); - QSGItem *l2c3 = new TestFocusScope(l1c3); + QQuickItem *l2c1 = new TestItem(l1c1); + QQuickItem *l2c2 = new TestItem(l1c1); + QQuickItem *l2c3 = new TestFocusScope(l1c3); - QSGItem *l3c1 = new TestItem(l2c3); - QSGItem *l3c2 = new TestFocusScope(l2c3); + QQuickItem *l3c1 = new TestItem(l2c3); + QQuickItem *l3c2 = new TestFocusScope(l2c3); - QSGItem *l4c1 = new TestItem(l3c2); - QSGItem *l4c2 = new TestItem(l3c2); + QQuickItem *l4c1 = new TestItem(l3c2); + QQuickItem *l4c2 = new TestItem(l3c2); FocusState focusState; focusState << l1c1 << l1c2 << l1c3 @@ -363,13 +363,13 @@ void tst_qsgitem::scopedFocus() } // Tests focus corrects itself when a tree is added to a canvas for the first time -void tst_qsgitem::addedToCanvas() +void tst_qquickitem::addedToCanvas() { { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *item = new TestItem; + QQuickItem *item = new TestItem; FocusState focusState; focusState << item; @@ -385,14 +385,14 @@ void tst_qsgitem::addedToCanvas() } { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *item = new TestItem(canvas.rootItem()); + QQuickItem *item = new TestItem(canvas.rootItem()); - QSGItem *tree = new TestItem; - QSGItem *c1 = new TestItem(tree); - QSGItem *c2 = new TestItem(tree); + QQuickItem *tree = new TestItem; + QQuickItem *c1 = new TestItem(tree); + QQuickItem *c2 = new TestItem(tree); FocusState focusState; focusState << item << tree << c1 << c2; @@ -413,12 +413,12 @@ void tst_qsgitem::addedToCanvas() } { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *tree = new TestItem; - QSGItem *c1 = new TestItem(tree); - QSGItem *c2 = new TestItem(tree); + QQuickItem *tree = new TestItem; + QQuickItem *c1 = new TestItem(tree); + QQuickItem *c2 = new TestItem(tree); FocusState focusState; focusState << tree << c1 << c2; @@ -436,11 +436,11 @@ void tst_qsgitem::addedToCanvas() } { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *tree = new TestFocusScope; - QSGItem *c1 = new TestItem(tree); - QSGItem *c2 = new TestItem(tree); + QQuickItem *tree = new TestFocusScope; + QQuickItem *c1 = new TestItem(tree); + QQuickItem *c2 = new TestItem(tree); FocusState focusState; focusState << tree << c1 << c2; @@ -463,11 +463,11 @@ void tst_qsgitem::addedToCanvas() } { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *tree = new TestFocusScope; - QSGItem *c1 = new TestItem(tree); - QSGItem *c2 = new TestItem(tree); + QQuickItem *tree = new TestFocusScope; + QQuickItem *c1 = new TestItem(tree); + QQuickItem *c2 = new TestItem(tree); FocusState focusState; focusState << tree << c1 << c2; @@ -488,12 +488,12 @@ void tst_qsgitem::addedToCanvas() } { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *child = new TestItem(canvas.rootItem()); - QSGItem *tree = new TestFocusScope; - QSGItem *c1 = new TestItem(tree); - QSGItem *c2 = new TestItem(tree); + QQuickItem *child = new TestItem(canvas.rootItem()); + QQuickItem *tree = new TestFocusScope; + QQuickItem *c1 = new TestItem(tree); + QQuickItem *c2 = new TestItem(tree); FocusState focusState; focusState << child << tree << c1 << c2; @@ -523,13 +523,13 @@ void tst_qsgitem::addedToCanvas() } } -void tst_qsgitem::changeParent() +void tst_qquickitem::changeParent() { // Parent to no parent { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *child = new TestItem(canvas.rootItem()); + QQuickItem *child = new TestItem(canvas.rootItem()); FocusState focusState; focusState << child; @@ -548,10 +548,10 @@ void tst_qsgitem::changeParent() // Different parent, same focus scope { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *child = new TestItem(canvas.rootItem()); - QSGItem *child2 = new TestItem(canvas.rootItem()); + QQuickItem *child = new TestItem(canvas.rootItem()); + QQuickItem *child2 = new TestItem(canvas.rootItem()); FocusState focusState; focusState << child << child2; @@ -568,11 +568,11 @@ void tst_qsgitem::changeParent() // Different parent, different focus scope { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *child = new TestItem(canvas.rootItem()); - QSGItem *child2 = new TestFocusScope(canvas.rootItem()); - QSGItem *item = new TestItem(child); + QQuickItem *child = new TestItem(canvas.rootItem()); + QQuickItem *child2 = new TestFocusScope(canvas.rootItem()); + QQuickItem *item = new TestItem(child); FocusState focusState; focusState << child << child2 << item; @@ -589,11 +589,11 @@ void tst_qsgitem::changeParent() FVERIFY(); } { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *child = new TestItem(canvas.rootItem()); - QSGItem *child2 = new TestFocusScope(canvas.rootItem()); - QSGItem *item = new TestItem(child2); + QQuickItem *child = new TestItem(canvas.rootItem()); + QQuickItem *child2 = new TestFocusScope(canvas.rootItem()); + QQuickItem *item = new TestItem(child2); FocusState focusState; focusState << child << child2 << item; @@ -610,11 +610,11 @@ void tst_qsgitem::changeParent() FVERIFY(); } { - QSGCanvas canvas; + QQuickCanvas canvas; ensureFocus(&canvas); - QSGItem *child = new TestItem(canvas.rootItem()); - QSGItem *child2 = new TestFocusScope(canvas.rootItem()); - QSGItem *item = new TestItem(child2); + QQuickItem *child = new TestItem(canvas.rootItem()); + QQuickItem *child2 = new TestFocusScope(canvas.rootItem()); + QQuickItem *item = new TestItem(child2); FocusState focusState; focusState << child << child2 << item; @@ -634,19 +634,19 @@ void tst_qsgitem::changeParent() } -void tst_qsgitem::constructor() +void tst_qquickitem::constructor() { - QSGItem *root = new QSGItem; + QQuickItem *root = new QQuickItem; QVERIFY(root->parent() == 0); QVERIFY(root->parentItem() == 0); - QSGItem *child1 = new QSGItem(root); + QQuickItem *child1 = new QQuickItem(root); QVERIFY(child1->parent() == root); QVERIFY(child1->parentItem() == root); QCOMPARE(root->childItems().count(), 1); QCOMPARE(root->childItems().at(0), child1); - QSGItem *child2 = new QSGItem(root); + QQuickItem *child2 = new QQuickItem(root); QVERIFY(child2->parent() == root); QVERIFY(child2->parentItem() == root); QCOMPARE(root->childItems().count(), 2); @@ -656,13 +656,13 @@ void tst_qsgitem::constructor() delete root; } -void tst_qsgitem::setParentItem() +void tst_qquickitem::setParentItem() { - QSGItem *root = new QSGItem; + QQuickItem *root = new QQuickItem; QVERIFY(root->parent() == 0); QVERIFY(root->parentItem() == 0); - QSGItem *child1 = new QSGItem; + QQuickItem *child1 = new QQuickItem; QVERIFY(child1->parent() == 0); QVERIFY(child1->parentItem() == 0); @@ -672,7 +672,7 @@ void tst_qsgitem::setParentItem() QCOMPARE(root->childItems().count(), 1); QCOMPARE(root->childItems().at(0), child1); - QSGItem *child2 = new QSGItem; + QQuickItem *child2 = new QQuickItem; QVERIFY(child2->parent() == 0); QVERIFY(child2->parentItem() == 0); child2->setParentItem(root); @@ -699,14 +699,14 @@ void tst_qsgitem::setParentItem() delete child2; } -void tst_qsgitem::visible() +void tst_qquickitem::visible() { - QSGItem *root = new QSGItem; + QQuickItem *root = new QQuickItem; - QSGItem *child1 = new QSGItem; + QQuickItem *child1 = new QQuickItem; child1->setParentItem(root); - QSGItem *child2 = new QSGItem; + QQuickItem *child2 = new QQuickItem; child2->setParentItem(root); QVERIFY(child1->isVisible()); @@ -737,14 +737,14 @@ void tst_qsgitem::visible() delete child2; } -void tst_qsgitem::enabled() +void tst_qquickitem::enabled() { - QSGItem *root = new QSGItem; + QQuickItem *root = new QQuickItem; - QSGItem *child1 = new QSGItem; + QQuickItem *child1 = new QQuickItem; child1->setParentItem(root); - QSGItem *child2 = new QSGItem; + QQuickItem *child2 = new QQuickItem; child2->setParentItem(root); QVERIFY(child1->isEnabled()); @@ -775,9 +775,9 @@ void tst_qsgitem::enabled() delete child2; } -void tst_qsgitem::mouseGrab() +void tst_qquickitem::mouseGrab() { - QSGCanvas *canvas = new QSGCanvas; + QQuickCanvas *canvas = new QQuickCanvas; canvas->resize(200, 200); canvas->show(); @@ -852,9 +852,9 @@ void tst_qsgitem::mouseGrab() delete canvas; } -void tst_qsgitem::polishOutsideAnimation() +void tst_qquickitem::polishOutsideAnimation() { - QSGCanvas *canvas = new QSGCanvas; + QQuickCanvas *canvas = new QQuickCanvas; canvas->resize(200, 200); canvas->show(); @@ -867,7 +867,7 @@ void tst_qsgitem::polishOutsideAnimation() delete canvas; } -void tst_qsgitem::wheelEvent_data() +void tst_qquickitem::wheelEvent_data() { QTest::addColumn<bool>("visible"); QTest::addColumn<bool>("enabled"); @@ -878,14 +878,14 @@ void tst_qsgitem::wheelEvent_data() QTest::newRow("invisible and disabled") << false << false; } -void tst_qsgitem::wheelEvent() +void tst_qquickitem::wheelEvent() { QFETCH(bool, visible); QFETCH(bool, enabled); const bool shouldReceiveWheelEvents = visible && enabled; - QSGCanvas *canvas = new QSGCanvas; + QQuickCanvas *canvas = new QQuickCanvas; canvas->resize(200, 200); canvas->show(); @@ -911,12 +911,12 @@ void tst_qsgitem::wheelEvent() delete canvas; } -class HoverItem : public QSGItem +class HoverItem : public QQuickItem { Q_OBJECT public: - HoverItem(QSGItem *parent = 0) - : QSGItem(parent), hoverEnterCount(0), hoverMoveCount(0), hoverLeaveCount(0) + HoverItem(QQuickItem *parent = 0) + : QQuickItem(parent), hoverEnterCount(0), hoverMoveCount(0), hoverLeaveCount(0) { } void resetCounters() { hoverEnterCount = 0; @@ -941,7 +941,7 @@ protected: } }; -void tst_qsgitem::hoverEvent_data() +void tst_qquickitem::hoverEvent_data() { QTest::addColumn<bool>("visible"); QTest::addColumn<bool>("enabled"); @@ -965,13 +965,13 @@ static void sendMouseMove(QObject *object, const QPoint &position) QApplication::sendEvent(object, &moveEvent); } -void tst_qsgitem::hoverEvent() +void tst_qquickitem::hoverEvent() { QFETCH(bool, visible); QFETCH(bool, enabled); QFETCH(bool, acceptHoverEvents); - QSGCanvas *canvas = new QSGCanvas(); + QQuickCanvas *canvas = new QQuickCanvas(); canvas->resize(200, 200); canvas->show(); @@ -1010,9 +1010,9 @@ void tst_qsgitem::hoverEvent() delete canvas; } -void tst_qsgitem::hoverEventInParent() +void tst_qquickitem::hoverEventInParent() { - QSGCanvas *canvas = new QSGCanvas(); + QQuickCanvas *canvas = new QQuickCanvas(); canvas->resize(200, 200); canvas->show(); @@ -1056,6 +1056,6 @@ void tst_qsgitem::hoverEventInParent() delete canvas; } -QTEST_MAIN(tst_qsgitem) +QTEST_MAIN(tst_qquickitem) -#include "tst_qsgitem.moc" +#include "tst_qquickitem.moc" diff --git a/tests/auto/declarative/qsgitem2/data/childrenProperty.qml b/tests/auto/declarative/qquickitem2/data/childrenProperty.qml index 85ddbc1446..85ddbc1446 100644 --- a/tests/auto/declarative/qsgitem2/data/childrenProperty.qml +++ b/tests/auto/declarative/qquickitem2/data/childrenProperty.qml diff --git a/tests/auto/declarative/qsgitem2/data/childrenRect.qml b/tests/auto/declarative/qquickitem2/data/childrenRect.qml index ebc57aefbe..ebc57aefbe 100644 --- a/tests/auto/declarative/qsgitem2/data/childrenRect.qml +++ b/tests/auto/declarative/qquickitem2/data/childrenRect.qml diff --git a/tests/auto/declarative/qsgitem2/data/childrenRectBug.qml b/tests/auto/declarative/qquickitem2/data/childrenRectBug.qml index 86a4f19c5c..86a4f19c5c 100644 --- a/tests/auto/declarative/qsgitem2/data/childrenRectBug.qml +++ b/tests/auto/declarative/qquickitem2/data/childrenRectBug.qml diff --git a/tests/auto/declarative/qsgitem2/data/childrenRectBug2.qml b/tests/auto/declarative/qquickitem2/data/childrenRectBug2.qml index 6e80ed28af..6e80ed28af 100644 --- a/tests/auto/declarative/qsgitem2/data/childrenRectBug2.qml +++ b/tests/auto/declarative/qquickitem2/data/childrenRectBug2.qml diff --git a/tests/auto/declarative/qsgitem2/data/childrenRectBug3.qml b/tests/auto/declarative/qquickitem2/data/childrenRectBug3.qml index 518e76509e..518e76509e 100644 --- a/tests/auto/declarative/qsgitem2/data/childrenRectBug3.qml +++ b/tests/auto/declarative/qquickitem2/data/childrenRectBug3.qml diff --git a/tests/auto/declarative/qsgitem2/data/implicitsize.qml b/tests/auto/declarative/qquickitem2/data/implicitsize.qml index cc6aaf7d60..cc6aaf7d60 100644 --- a/tests/auto/declarative/qsgitem2/data/implicitsize.qml +++ b/tests/auto/declarative/qquickitem2/data/implicitsize.qml diff --git a/tests/auto/declarative/qsgitem2/data/keynavigationtest.qml b/tests/auto/declarative/qquickitem2/data/keynavigationtest.qml index aacb621fb0..aacb621fb0 100644 --- a/tests/auto/declarative/qsgitem2/data/keynavigationtest.qml +++ b/tests/auto/declarative/qquickitem2/data/keynavigationtest.qml diff --git a/tests/auto/declarative/qsgitem2/data/keynavigationtest_implicit.qml b/tests/auto/declarative/qquickitem2/data/keynavigationtest_implicit.qml index 92d4ae23de..92d4ae23de 100644 --- a/tests/auto/declarative/qsgitem2/data/keynavigationtest_implicit.qml +++ b/tests/auto/declarative/qquickitem2/data/keynavigationtest_implicit.qml diff --git a/tests/auto/declarative/qsgitem2/data/keyspriority.qml b/tests/auto/declarative/qquickitem2/data/keyspriority.qml index 114cf0488a..114cf0488a 100644 --- a/tests/auto/declarative/qsgitem2/data/keyspriority.qml +++ b/tests/auto/declarative/qquickitem2/data/keyspriority.qml diff --git a/tests/auto/declarative/qsgitem2/data/keystest.qml b/tests/auto/declarative/qquickitem2/data/keystest.qml index c70e0061f5..c70e0061f5 100644 --- a/tests/auto/declarative/qsgitem2/data/keystest.qml +++ b/tests/auto/declarative/qquickitem2/data/keystest.qml diff --git a/tests/auto/declarative/qsgitem2/data/layoutmirroring.qml b/tests/auto/declarative/qquickitem2/data/layoutmirroring.qml index 036819740c..036819740c 100644 --- a/tests/auto/declarative/qsgitem2/data/layoutmirroring.qml +++ b/tests/auto/declarative/qquickitem2/data/layoutmirroring.qml diff --git a/tests/auto/declarative/qsgitem2/data/mapCoordinates.qml b/tests/auto/declarative/qquickitem2/data/mapCoordinates.qml index 566cb220ff..566cb220ff 100644 --- a/tests/auto/declarative/qsgitem2/data/mapCoordinates.qml +++ b/tests/auto/declarative/qquickitem2/data/mapCoordinates.qml diff --git a/tests/auto/declarative/qsgitem2/data/propertychanges.qml b/tests/auto/declarative/qquickitem2/data/propertychanges.qml index 3fa5ea9c23..3fa5ea9c23 100644 --- a/tests/auto/declarative/qsgitem2/data/propertychanges.qml +++ b/tests/auto/declarative/qquickitem2/data/propertychanges.qml diff --git a/tests/auto/declarative/qsgitem2/data/qtbug_16871.qml b/tests/auto/declarative/qquickitem2/data/qtbug_16871.qml index f1e7377730..f1e7377730 100644 --- a/tests/auto/declarative/qsgitem2/data/qtbug_16871.qml +++ b/tests/auto/declarative/qquickitem2/data/qtbug_16871.qml diff --git a/tests/auto/declarative/qsgitem2/data/resourcesProperty.qml b/tests/auto/declarative/qquickitem2/data/resourcesProperty.qml index b8f18bb375..b8f18bb375 100644 --- a/tests/auto/declarative/qsgitem2/data/resourcesProperty.qml +++ b/tests/auto/declarative/qquickitem2/data/resourcesProperty.qml diff --git a/tests/auto/declarative/qsgitem2/data/transformCrash.qml b/tests/auto/declarative/qquickitem2/data/transformCrash.qml index 284e85f0e0..284e85f0e0 100644 --- a/tests/auto/declarative/qsgitem2/data/transformCrash.qml +++ b/tests/auto/declarative/qquickitem2/data/transformCrash.qml diff --git a/tests/auto/declarative/qsgitem2/qsgitem2.pro b/tests/auto/declarative/qquickitem2/qquickitem2.pro index 517e67619b..47b31d98e9 100644 --- a/tests/auto/declarative/qsgitem2/qsgitem2.pro +++ b/tests/auto/declarative/qquickitem2/qquickitem2.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qsgitem +TARGET = tst_qquickitem macx:CONFIG -= app_bundle -SOURCES += tst_qsgitem.cpp +SOURCES += tst_qquickitem.cpp testDataFiles.files = data testDataFiles.path = . diff --git a/tests/auto/declarative/qsgitem2/tst_qsgitem.cpp b/tests/auto/declarative/qquickitem2/tst_qquickitem.cpp index fe29de1aad..711ca17ae1 100644 --- a/tests/auto/declarative/qsgitem2/tst_qsgitem.cpp +++ b/tests/auto/declarative/qquickitem2/tst_qquickitem.cpp @@ -43,16 +43,16 @@ #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecomponent.h> #include <QtDeclarative/qdeclarativecontext.h> -#include <QtDeclarative/qsgview.h> -#include <private/qsgrectangle_p.h> -#include <private/qsgitem_p.h> +#include <QtDeclarative/qquickview.h> +#include <private/qquickrectangle_p.h> +#include <private/qquickitem_p.h> #include "../shared/util.h" -class tst_QSGItem : public QObject +class tst_QQuickItem : public QObject { Q_OBJECT public: - tst_QSGItem(); + tst_QQuickItem(); private slots: void initTestCase(); @@ -87,15 +87,15 @@ private: }; template<typename T> -T *findItem(QSGItem *parent, const QString &objectName) +T *findItem(QQuickItem *parent, const QString &objectName) { if (!parent) return 0; const QMetaObject &mo = T::staticMetaObject; - //qDebug() << parent->QSGItem::children().count() << "children"; + //qDebug() << parent->QQuickItem::children().count() << "children"; for (int i = 0; i < parent->childItems().count(); ++i) { - QSGItem *item = qobject_cast<QSGItem*>(parent->childItems().at(i)); + QQuickItem *item = qobject_cast<QQuickItem*>(parent->childItems().at(i)); if (!item) continue; //qDebug() << "try" << item; @@ -161,11 +161,11 @@ public: private: }; -class KeyTestItem : public QSGItem +class KeyTestItem : public QQuickItem { Q_OBJECT public: - KeyTestItem(QSGItem *parent=0) : QSGItem(parent), mKey(0) {} + KeyTestItem(QQuickItem *parent=0) : QQuickItem(parent), mKey(0) {} protected: void keyPressEvent(QKeyEvent *e) { @@ -191,18 +191,18 @@ public: QML_DECLARE_TYPE(KeyTestItem); -tst_QSGItem::tst_QSGItem() +tst_QQuickItem::tst_QQuickItem() { } -void tst_QSGItem::initTestCase() +void tst_QQuickItem::initTestCase() { qmlRegisterType<KeyTestItem>("Test",1,0,"KeyTestItem"); } -void tst_QSGItem::keys() +void tst_QQuickItem::keys() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setBaseSize(QSize(240,320)); KeysTestObject *testObject = new KeysTestObject; @@ -324,9 +324,9 @@ void tst_QSGItem::keys() delete testObject; } -void tst_QSGItem::keysProcessingOrder() +void tst_QQuickItem::keysProcessingOrder() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setBaseSize(QSize(240,320)); KeysTestObject *testObject = new KeysTestObject; @@ -380,35 +380,35 @@ void tst_QSGItem::keysProcessingOrder() delete testObject; } -QSGItemPrivate *childPrivate(QSGItem *rootItem, const char * itemString) +QQuickItemPrivate *childPrivate(QQuickItem *rootItem, const char * itemString) { - QSGItem *item = findItem<QSGItem>(rootItem, QString(QLatin1String(itemString))); - QSGItemPrivate* itemPrivate = QSGItemPrivate::get(item); + QQuickItem *item = findItem<QQuickItem>(rootItem, QString(QLatin1String(itemString))); + QQuickItemPrivate* itemPrivate = QQuickItemPrivate::get(item); return itemPrivate; } -QVariant childProperty(QSGItem *rootItem, const char * itemString, const char * property) +QVariant childProperty(QQuickItem *rootItem, const char * itemString, const char * property) { - QSGItem *item = findItem<QSGItem>(rootItem, QString(QLatin1String(itemString))); + QQuickItem *item = findItem<QQuickItem>(rootItem, QString(QLatin1String(itemString))); return item->property(property); } -bool anchorsMirrored(QSGItem *rootItem, const char * itemString) +bool anchorsMirrored(QQuickItem *rootItem, const char * itemString) { - QSGItem *item = findItem<QSGItem>(rootItem, QString(QLatin1String(itemString))); - QSGItemPrivate* itemPrivate = QSGItemPrivate::get(item); + QQuickItem *item = findItem<QQuickItem>(rootItem, QString(QLatin1String(itemString))); + QQuickItemPrivate* itemPrivate = QQuickItemPrivate::get(item); return itemPrivate->anchors()->mirrored(); } -void tst_QSGItem::layoutMirroring() +void tst_QQuickItem::layoutMirroring() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("layoutmirroring.qml"))); canvas->show(); - QSGItem *rootItem = qobject_cast<QSGItem*>(canvas->rootObject()); + QQuickItem *rootItem = qobject_cast<QQuickItem*>(canvas->rootObject()); QVERIFY(rootItem); - QSGItemPrivate *rootPrivate = QSGItemPrivate::get(rootItem); + QQuickItemPrivate *rootPrivate = QQuickItemPrivate::get(rootItem); QVERIFY(rootPrivate); QCOMPARE(childPrivate(rootItem, "mirrored1")->effectiveLayoutMirror, true); @@ -499,38 +499,38 @@ void tst_QSGItem::layoutMirroring() // // dynamic parenting // - QSGItem *parentItem1 = new QSGItem(); - QSGItemPrivate::get(parentItem1)->effectiveLayoutMirror = true; // LayoutMirroring.enabled: true - QSGItemPrivate::get(parentItem1)->isMirrorImplicit = false; - QSGItemPrivate::get(parentItem1)->inheritMirrorFromItem = true; // LayoutMirroring.childrenInherit: true - QSGItemPrivate::get(parentItem1)->resolveLayoutMirror(); + QQuickItem *parentItem1 = new QQuickItem(); + QQuickItemPrivate::get(parentItem1)->effectiveLayoutMirror = true; // LayoutMirroring.enabled: true + QQuickItemPrivate::get(parentItem1)->isMirrorImplicit = false; + QQuickItemPrivate::get(parentItem1)->inheritMirrorFromItem = true; // LayoutMirroring.childrenInherit: true + QQuickItemPrivate::get(parentItem1)->resolveLayoutMirror(); // inherit in constructor - QSGItem *childItem1 = new QSGItem(parentItem1); - QCOMPARE(QSGItemPrivate::get(childItem1)->effectiveLayoutMirror, true); - QCOMPARE(QSGItemPrivate::get(childItem1)->inheritMirrorFromParent, true); + QQuickItem *childItem1 = new QQuickItem(parentItem1); + QCOMPARE(QQuickItemPrivate::get(childItem1)->effectiveLayoutMirror, true); + QCOMPARE(QQuickItemPrivate::get(childItem1)->inheritMirrorFromParent, true); // inherit through a parent change - QSGItem *childItem2 = new QSGItem(); - QCOMPARE(QSGItemPrivate::get(childItem2)->effectiveLayoutMirror, false); - QCOMPARE(QSGItemPrivate::get(childItem2)->inheritMirrorFromParent, false); + QQuickItem *childItem2 = new QQuickItem(); + QCOMPARE(QQuickItemPrivate::get(childItem2)->effectiveLayoutMirror, false); + QCOMPARE(QQuickItemPrivate::get(childItem2)->inheritMirrorFromParent, false); childItem2->setParentItem(parentItem1); - QCOMPARE(QSGItemPrivate::get(childItem2)->effectiveLayoutMirror, true); - QCOMPARE(QSGItemPrivate::get(childItem2)->inheritMirrorFromParent, true); + QCOMPARE(QQuickItemPrivate::get(childItem2)->effectiveLayoutMirror, true); + QCOMPARE(QQuickItemPrivate::get(childItem2)->inheritMirrorFromParent, true); // stop inherting through a parent change - QSGItem *parentItem2 = new QSGItem(); - QSGItemPrivate::get(parentItem2)->effectiveLayoutMirror = true; // LayoutMirroring.enabled: true - QSGItemPrivate::get(parentItem2)->resolveLayoutMirror(); + QQuickItem *parentItem2 = new QQuickItem(); + QQuickItemPrivate::get(parentItem2)->effectiveLayoutMirror = true; // LayoutMirroring.enabled: true + QQuickItemPrivate::get(parentItem2)->resolveLayoutMirror(); childItem2->setParentItem(parentItem2); - QCOMPARE(QSGItemPrivate::get(childItem2)->effectiveLayoutMirror, false); - QCOMPARE(QSGItemPrivate::get(childItem2)->inheritMirrorFromParent, false); + QCOMPARE(QQuickItemPrivate::get(childItem2)->effectiveLayoutMirror, false); + QCOMPARE(QQuickItemPrivate::get(childItem2)->inheritMirrorFromParent, false); delete parentItem1; delete parentItem2; } -void tst_QSGItem::layoutMirroringIllegalParent() +void tst_QQuickItem::layoutMirroringIllegalParent() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; QtObject { LayoutMirroring.enabled: true; LayoutMirroring.childrenInherit: true }", QUrl::fromLocalFile("")); @@ -539,9 +539,9 @@ void tst_QSGItem::layoutMirroringIllegalParent() QVERIFY(object != 0); } -void tst_QSGItem::keyNavigation() +void tst_QQuickItem::keyNavigation() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setBaseSize(QSize(240,320)); canvas->setSource(QUrl::fromLocalFile(TESTDATA("keynavigationtest.qml"))); @@ -553,7 +553,7 @@ void tst_QSGItem::keyNavigation() QFocusEvent fe(QEvent::FocusIn); QApplication::sendEvent(canvas, &fe); - QSGItem *item = findItem<QSGItem>(canvas->rootObject(), "item1"); + QQuickItem *item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -567,7 +567,7 @@ void tst_QSGItem::keyNavigation() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item2"); + item = findItem<QQuickItem>(canvas->rootObject(), "item2"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -576,7 +576,7 @@ void tst_QSGItem::keyNavigation() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item4"); + item = findItem<QQuickItem>(canvas->rootObject(), "item4"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -585,7 +585,7 @@ void tst_QSGItem::keyNavigation() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item3"); + item = findItem<QQuickItem>(canvas->rootObject(), "item3"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -594,7 +594,7 @@ void tst_QSGItem::keyNavigation() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item1"); + item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -603,7 +603,7 @@ void tst_QSGItem::keyNavigation() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item2"); + item = findItem<QQuickItem>(canvas->rootObject(), "item2"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -612,25 +612,25 @@ void tst_QSGItem::keyNavigation() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item1"); + item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); delete canvas; } -void tst_QSGItem::keyNavigation_RightToLeft() +void tst_QQuickItem::keyNavigation_RightToLeft() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setBaseSize(QSize(240,320)); canvas->setSource(QUrl::fromLocalFile(TESTDATA("keynavigationtest.qml"))); canvas->show(); qApp->processEvents(); - QSGItem *rootItem = qobject_cast<QSGItem*>(canvas->rootObject()); + QQuickItem *rootItem = qobject_cast<QQuickItem*>(canvas->rootObject()); QVERIFY(rootItem); - QSGItemPrivate* rootItemPrivate = QSGItemPrivate::get(rootItem); + QQuickItemPrivate* rootItemPrivate = QQuickItemPrivate::get(rootItem); rootItemPrivate->effectiveLayoutMirror = true; // LayoutMirroring.mirror: true rootItemPrivate->isMirrorImplicit = false; @@ -642,7 +642,7 @@ void tst_QSGItem::keyNavigation_RightToLeft() QFocusEvent fe(QEvent::FocusIn); QApplication::sendEvent(canvas, &fe); - QSGItem *item = findItem<QSGItem>(canvas->rootObject(), "item1"); + QQuickItem *item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -656,7 +656,7 @@ void tst_QSGItem::keyNavigation_RightToLeft() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item2"); + item = findItem<QQuickItem>(canvas->rootObject(), "item2"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -665,16 +665,16 @@ void tst_QSGItem::keyNavigation_RightToLeft() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item1"); + item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); delete canvas; } -void tst_QSGItem::keyNavigation_skipNotVisible() +void tst_QQuickItem::keyNavigation_skipNotVisible() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setBaseSize(QSize(240,320)); canvas->setSource(QUrl::fromLocalFile(TESTDATA("keynavigationtest.qml"))); @@ -686,12 +686,12 @@ void tst_QSGItem::keyNavigation_skipNotVisible() QFocusEvent fe(QEvent::FocusIn); QApplication::sendEvent(canvas, &fe); - QSGItem *item = findItem<QSGItem>(canvas->rootObject(), "item1"); + QQuickItem *item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); // Set item 2 to not visible - item = findItem<QSGItem>(canvas->rootObject(), "item2"); + item = findItem<QQuickItem>(canvas->rootObject(), "item2"); QVERIFY(item); item->setVisible(false); QVERIFY(!item->isVisible()); @@ -701,7 +701,7 @@ void tst_QSGItem::keyNavigation_skipNotVisible() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item1"); + item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -710,7 +710,7 @@ void tst_QSGItem::keyNavigation_skipNotVisible() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item3"); + item = findItem<QQuickItem>(canvas->rootObject(), "item3"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -719,12 +719,12 @@ void tst_QSGItem::keyNavigation_skipNotVisible() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item1"); + item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); //Set item 3 to not visible - item = findItem<QSGItem>(canvas->rootObject(), "item3"); + item = findItem<QQuickItem>(canvas->rootObject(), "item3"); QVERIFY(item); item->setVisible(false); QVERIFY(!item->isVisible()); @@ -734,7 +734,7 @@ void tst_QSGItem::keyNavigation_skipNotVisible() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item4"); + item = findItem<QQuickItem>(canvas->rootObject(), "item4"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -743,16 +743,16 @@ void tst_QSGItem::keyNavigation_skipNotVisible() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item1"); + item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); delete canvas; } -void tst_QSGItem::keyNavigation_implicitSetting() +void tst_QQuickItem::keyNavigation_implicitSetting() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setBaseSize(QSize(240,320)); canvas->setSource(QUrl::fromLocalFile(TESTDATA("keynavigationtest_implicit.qml"))); @@ -764,7 +764,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QFocusEvent fe(QEvent::FocusIn); QApplication::sendEvent(canvas, &fe); - QSGItem *item = findItem<QSGItem>(canvas->rootObject(), "item1"); + QQuickItem *item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -778,7 +778,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item2"); + item = findItem<QQuickItem>(canvas->rootObject(), "item2"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -787,7 +787,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item1"); + item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -796,7 +796,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item3"); + item = findItem<QQuickItem>(canvas->rootObject(), "item3"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -805,7 +805,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item4"); + item = findItem<QQuickItem>(canvas->rootObject(), "item4"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -814,7 +814,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item3"); + item = findItem<QQuickItem>(canvas->rootObject(), "item3"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -823,7 +823,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item4"); + item = findItem<QQuickItem>(canvas->rootObject(), "item4"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -832,7 +832,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item2"); + item = findItem<QQuickItem>(canvas->rootObject(), "item2"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -841,7 +841,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item4"); + item = findItem<QQuickItem>(canvas->rootObject(), "item4"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -850,7 +850,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item1"); + item = findItem<QQuickItem>(canvas->rootObject(), "item1"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -859,7 +859,7 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item4"); + item = findItem<QQuickItem>(canvas->rootObject(), "item4"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); @@ -868,18 +868,18 @@ void tst_QSGItem::keyNavigation_implicitSetting() QApplication::sendEvent(canvas, &key); QVERIFY(key.isAccepted()); - item = findItem<QSGItem>(canvas->rootObject(), "item3"); + item = findItem<QQuickItem>(canvas->rootObject(), "item3"); QVERIFY(item); QVERIFY(item->hasActiveFocus()); delete canvas; } -void tst_QSGItem::smooth() +void tst_QQuickItem::smooth() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0; Item { smooth: false; }", QUrl::fromLocalFile("")); - QSGItem *item = qobject_cast<QSGItem*>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(component.create()); QSignalSpy spy(item, SIGNAL(smoothChanged(bool))); QVERIFY(item); @@ -904,11 +904,11 @@ void tst_QSGItem::smooth() delete item; } -void tst_QSGItem::clip() +void tst_QQuickItem::clip() { QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0\nItem { clip: false\n }", QUrl::fromLocalFile("")); - QSGItem *item = qobject_cast<QSGItem*>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(component.create()); QSignalSpy spy(item, SIGNAL(clipChanged(bool))); QVERIFY(item); @@ -934,41 +934,41 @@ void tst_QSGItem::clip() delete item; } -void tst_QSGItem::mapCoordinates() +void tst_QQuickItem::mapCoordinates() { QFETCH(int, x); QFETCH(int, y); - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setBaseSize(QSize(300, 300)); canvas->setSource(QUrl::fromLocalFile(TESTDATA("mapCoordinates.qml"))); canvas->show(); qApp->processEvents(); - QSGItem *root = qobject_cast<QSGItem*>(canvas->rootObject()); + QQuickItem *root = qobject_cast<QQuickItem*>(canvas->rootObject()); QVERIFY(root != 0); - QSGItem *a = findItem<QSGItem>(canvas->rootObject(), "itemA"); + QQuickItem *a = findItem<QQuickItem>(canvas->rootObject(), "itemA"); QVERIFY(a != 0); - QSGItem *b = findItem<QSGItem>(canvas->rootObject(), "itemB"); + QQuickItem *b = findItem<QQuickItem>(canvas->rootObject(), "itemB"); QVERIFY(b != 0); QVariant result; QVERIFY(QMetaObject::invokeMethod(root, "mapAToB", Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y))); - QCOMPARE(result.value<QPointF>(), qobject_cast<QSGItem*>(a)->mapToItem(b, QPointF(x, y))); + QCOMPARE(result.value<QPointF>(), qobject_cast<QQuickItem*>(a)->mapToItem(b, QPointF(x, y))); QVERIFY(QMetaObject::invokeMethod(root, "mapAFromB", Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y))); - QCOMPARE(result.value<QPointF>(), qobject_cast<QSGItem*>(a)->mapFromItem(b, QPointF(x, y))); + QCOMPARE(result.value<QPointF>(), qobject_cast<QQuickItem*>(a)->mapFromItem(b, QPointF(x, y))); QVERIFY(QMetaObject::invokeMethod(root, "mapAToNull", Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y))); - QCOMPARE(result.value<QPointF>(), qobject_cast<QSGItem*>(a)->mapToScene(QPointF(x, y))); + QCOMPARE(result.value<QPointF>(), qobject_cast<QQuickItem*>(a)->mapToScene(QPointF(x, y))); QVERIFY(QMetaObject::invokeMethod(root, "mapAFromNull", Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y))); - QCOMPARE(result.value<QPointF>(), qobject_cast<QSGItem*>(a)->mapFromScene(QPointF(x, y))); + QCOMPARE(result.value<QPointF>(), qobject_cast<QQuickItem*>(a)->mapFromScene(QPointF(x, y))); QString warning1 = QUrl::fromLocalFile(TESTDATA("mapCoordinates.qml")).toString() + ":48:5: QML Item: mapToItem() given argument \"1122\" which is neither null nor an Item"; QString warning2 = QUrl::fromLocalFile(TESTDATA("mapCoordinates.qml")).toString() + ":48:5: QML Item: mapFromItem() given argument \"1122\" which is neither null nor an Item"; @@ -986,7 +986,7 @@ void tst_QSGItem::mapCoordinates() delete canvas; } -void tst_QSGItem::mapCoordinates_data() +void tst_QQuickItem::mapCoordinates_data() { QTest::addColumn<int>("x"); QTest::addColumn<int>("y"); @@ -995,7 +995,7 @@ void tst_QSGItem::mapCoordinates_data() QTest::newRow(QTest::toString(i)) << i << i; } -void tst_QSGItem::transforms_data() +void tst_QQuickItem::transforms_data() { QTest::addColumn<QByteArray>("qml"); QTest::addColumn<QTransform>("transform"); @@ -1009,18 +1009,18 @@ void tst_QSGItem::transforms_data() << QTransform(1,0,0,0,1,0,10,20,1) * QTransform(1.5,0,0,0,-2,0,0,0,1); } -void tst_QSGItem::transforms() +void tst_QQuickItem::transforms() { QFETCH(QByteArray, qml); QFETCH(QTransform, transform); QDeclarativeComponent component(&engine); component.setData("import QtQuick 2.0\nItem { transform: "+qml+"}", QUrl::fromLocalFile("")); - QSGItem *item = qobject_cast<QSGItem*>(component.create()); + QQuickItem *item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); QCOMPARE(item->itemTransform(0,0), transform); } -void tst_QSGItem::childrenProperty() +void tst_QQuickItem::childrenProperty() { QDeclarativeComponent component(&engine, TESTDATA("childrenProperty.qml")); @@ -1035,7 +1035,7 @@ void tst_QSGItem::childrenProperty() delete o; } -void tst_QSGItem::resourcesProperty() +void tst_QQuickItem::resourcesProperty() { QDeclarativeComponent component(&engine, TESTDATA("resourcesProperty.qml")); @@ -1050,22 +1050,22 @@ void tst_QSGItem::resourcesProperty() delete o; } -void tst_QSGItem::propertyChanges() +void tst_QQuickItem::propertyChanges() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setBaseSize(QSize(300, 300)); canvas->setSource(QUrl::fromLocalFile(TESTDATA("propertychanges.qml"))); canvas->show(); QTest::qWaitForWindowShown(canvas); - QSGItem *item = findItem<QSGItem>(canvas->rootObject(), "item"); - QSGItem *parentItem = findItem<QSGItem>(canvas->rootObject(), "parentItem"); + QQuickItem *item = findItem<QQuickItem>(canvas->rootObject(), "item"); + QQuickItem *parentItem = findItem<QQuickItem>(canvas->rootObject(), "parentItem"); QVERIFY(item); QVERIFY(parentItem); - QSignalSpy parentSpy(item, SIGNAL(parentChanged(QSGItem *))); + QSignalSpy parentSpy(item, SIGNAL(parentChanged(QQuickItem *))); QSignalSpy widthSpy(item, SIGNAL(widthChanged())); QSignalSpy heightSpy(item, SIGNAL(heightChanged())); QSignalSpy baselineOffsetSpy(item, SIGNAL(baselineOffsetChanged(qreal))); @@ -1086,7 +1086,7 @@ void tst_QSGItem::propertyChanges() QCOMPARE(parentSpy.count(),1); QList<QVariant> parentArguments = parentSpy.first(); QVERIFY(parentArguments.count() == 1); - QCOMPARE(item->parentItem(), qvariant_cast<QSGItem *>(parentArguments.at(0))); + QCOMPARE(item->parentItem(), qvariant_cast<QQuickItem *>(parentArguments.at(0))); QCOMPARE(childrenChangedSpy.count(),1); item->setParentItem(parentItem); @@ -1131,15 +1131,15 @@ void tst_QSGItem::propertyChanges() delete canvas; } -void tst_QSGItem::childrenRect() +void tst_QQuickItem::childrenRect() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("childrenRect.qml"))); canvas->setBaseSize(QSize(240,320)); canvas->show(); - QSGItem *o = canvas->rootObject(); - QSGItem *item = o->findChild<QSGItem*>("testItem"); + QQuickItem *o = canvas->rootObject(); + QQuickItem *item = o->findChild<QQuickItem*>("testItem"); QCOMPARE(item->width(), qreal(0)); QCOMPARE(item->height(), qreal(0)); @@ -1160,14 +1160,14 @@ void tst_QSGItem::childrenRect() } // QTBUG-11383 -void tst_QSGItem::childrenRectBug() +void tst_QQuickItem::childrenRectBug() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("childrenRectBug.qml"))); canvas->show(); - QSGItem *o = canvas->rootObject(); - QSGItem *item = o->findChild<QSGItem*>("theItem"); + QQuickItem *o = canvas->rootObject(); + QQuickItem *item = o->findChild<QQuickItem*>("theItem"); QCOMPARE(item->width(), qreal(200)); QCOMPARE(item->height(), qreal(100)); QCOMPARE(item->x(), qreal(100)); @@ -1176,20 +1176,20 @@ void tst_QSGItem::childrenRectBug() } // QTBUG-11465 -void tst_QSGItem::childrenRectBug2() +void tst_QQuickItem::childrenRectBug2() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("childrenRectBug2.qml"))); canvas->show(); - QSGRectangle *rect = qobject_cast<QSGRectangle*>(canvas->rootObject()); + QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(canvas->rootObject()); QVERIFY(rect); - QSGItem *item = rect->findChild<QSGItem*>("theItem"); + QQuickItem *item = rect->findChild<QQuickItem*>("theItem"); QCOMPARE(item->width(), qreal(100)); QCOMPARE(item->height(), qreal(110)); QCOMPARE(item->x(), qreal(130)); - QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect); + QQuickItemPrivate *rectPrivate = QQuickItemPrivate::get(rect); rectPrivate->setState("row"); QCOMPARE(item->width(), qreal(210)); QCOMPARE(item->height(), qreal(50)); @@ -1199,9 +1199,9 @@ void tst_QSGItem::childrenRectBug2() } // QTBUG-12722 -void tst_QSGItem::childrenRectBug3() +void tst_QQuickItem::childrenRectBug3() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("childrenRectBug3.qml"))); canvas->show(); @@ -1210,22 +1210,22 @@ void tst_QSGItem::childrenRectBug3() } // QTBUG-13893 -void tst_QSGItem::transformCrash() +void tst_QQuickItem::transformCrash() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("transformCrash.qml"))); canvas->show(); delete canvas; } -void tst_QSGItem::implicitSize() +void tst_QQuickItem::implicitSize() { - QSGView *canvas = new QSGView(0); + QQuickView *canvas = new QQuickView(0); canvas->setSource(QUrl::fromLocalFile(TESTDATA("implicitsize.qml"))); canvas->show(); - QSGItem *item = qobject_cast<QSGItem*>(canvas->rootObject()); + QQuickItem *item = qobject_cast<QQuickItem*>(canvas->rootObject()); QVERIFY(item); QCOMPARE(item->width(), qreal(80)); QCOMPARE(item->height(), qreal(60)); @@ -1248,7 +1248,7 @@ void tst_QSGItem::implicitSize() delete canvas; } -void tst_QSGItem::qtbug_16871() +void tst_QQuickItem::qtbug_16871() { QDeclarativeComponent component(&engine, TESTDATA("qtbug_16871.qml")); QObject *o = component.create(); @@ -1256,6 +1256,6 @@ void tst_QSGItem::qtbug_16871() delete o; } -QTEST_MAIN(tst_QSGItem) +QTEST_MAIN(tst_QQuickItem) -#include "tst_qsgitem.moc" +#include "tst_qquickitem.moc" diff --git a/tests/auto/declarative/qsglistview/data/ComponentView.qml b/tests/auto/declarative/qquicklistview/data/ComponentView.qml index 3e87be8799..3e87be8799 100644 --- a/tests/auto/declarative/qsglistview/data/ComponentView.qml +++ b/tests/auto/declarative/qquicklistview/data/ComponentView.qml diff --git a/tests/auto/declarative/qsglistview/data/attachedSignals.qml b/tests/auto/declarative/qquicklistview/data/attachedSignals.qml index 2c3c0bbada..2c3c0bbada 100644 --- a/tests/auto/declarative/qsglistview/data/attachedSignals.qml +++ b/tests/auto/declarative/qquicklistview/data/attachedSignals.qml diff --git a/tests/auto/declarative/qsglistview/data/creationContext.qml b/tests/auto/declarative/qquicklistview/data/creationContext.qml index 79a682788b..79a682788b 100644 --- a/tests/auto/declarative/qsglistview/data/creationContext.qml +++ b/tests/auto/declarative/qquicklistview/data/creationContext.qml diff --git a/tests/auto/declarative/qsglistview/data/displaylist.qml b/tests/auto/declarative/qquicklistview/data/displaylist.qml index 4e8fd32f6a..4e8fd32f6a 100644 --- a/tests/auto/declarative/qsglistview/data/displaylist.qml +++ b/tests/auto/declarative/qquicklistview/data/displaylist.qml diff --git a/tests/auto/declarative/qsglistview/data/fillModelOnComponentCompleted.qml b/tests/auto/declarative/qquicklistview/data/fillModelOnComponentCompleted.qml index 906e6adb6b..906e6adb6b 100644 --- a/tests/auto/declarative/qsglistview/data/fillModelOnComponentCompleted.qml +++ b/tests/auto/declarative/qquicklistview/data/fillModelOnComponentCompleted.qml diff --git a/tests/auto/declarative/qsglistview/data/footer.qml b/tests/auto/declarative/qquicklistview/data/footer.qml index 2a5619999e..2a5619999e 100644 --- a/tests/auto/declarative/qsglistview/data/footer.qml +++ b/tests/auto/declarative/qquicklistview/data/footer.qml diff --git a/tests/auto/declarative/qsglistview/data/header.qml b/tests/auto/declarative/qquicklistview/data/header.qml index bf70310630..bf70310630 100644 --- a/tests/auto/declarative/qsglistview/data/header.qml +++ b/tests/auto/declarative/qquicklistview/data/header.qml diff --git a/tests/auto/declarative/qsglistview/data/headerfooter.qml b/tests/auto/declarative/qquicklistview/data/headerfooter.qml index 8e8463d645..8e8463d645 100644 --- a/tests/auto/declarative/qsglistview/data/headerfooter.qml +++ b/tests/auto/declarative/qquicklistview/data/headerfooter.qml diff --git a/tests/auto/declarative/qsglistview/data/itemlist.qml b/tests/auto/declarative/qquicklistview/data/itemlist.qml index 90dd59795b..90dd59795b 100644 --- a/tests/auto/declarative/qsglistview/data/itemlist.qml +++ b/tests/auto/declarative/qquicklistview/data/itemlist.qml diff --git a/tests/auto/declarative/qsglistview/data/listview-enforcerange-nohighlight.qml b/tests/auto/declarative/qquicklistview/data/listview-enforcerange-nohighlight.qml index 1db1096499..1db1096499 100644 --- a/tests/auto/declarative/qsglistview/data/listview-enforcerange-nohighlight.qml +++ b/tests/auto/declarative/qquicklistview/data/listview-enforcerange-nohighlight.qml diff --git a/tests/auto/declarative/qsglistview/data/listview-enforcerange.qml b/tests/auto/declarative/qquicklistview/data/listview-enforcerange.qml index f1bf6c2b57..f1bf6c2b57 100644 --- a/tests/auto/declarative/qsglistview/data/listview-enforcerange.qml +++ b/tests/auto/declarative/qquicklistview/data/listview-enforcerange.qml diff --git a/tests/auto/declarative/qsglistview/data/listview-initCurrent.qml b/tests/auto/declarative/qquicklistview/data/listview-initCurrent.qml index c4f1860eda..c4f1860eda 100644 --- a/tests/auto/declarative/qsglistview/data/listview-initCurrent.qml +++ b/tests/auto/declarative/qquicklistview/data/listview-initCurrent.qml diff --git a/tests/auto/declarative/qsglistview/data/listview-noCurrent.qml b/tests/auto/declarative/qquicklistview/data/listview-noCurrent.qml index 079966d8e4..079966d8e4 100644 --- a/tests/auto/declarative/qsglistview/data/listview-noCurrent.qml +++ b/tests/auto/declarative/qquicklistview/data/listview-noCurrent.qml diff --git a/tests/auto/declarative/qsglistview/data/listview-sections.qml b/tests/auto/declarative/qquicklistview/data/listview-sections.qml index d5b8a4400d..d5b8a4400d 100644 --- a/tests/auto/declarative/qsglistview/data/listview-sections.qml +++ b/tests/auto/declarative/qquicklistview/data/listview-sections.qml diff --git a/tests/auto/declarative/qsglistview/data/listview-sections_delegate.qml b/tests/auto/declarative/qquicklistview/data/listview-sections_delegate.qml index 496d8d7784..496d8d7784 100644 --- a/tests/auto/declarative/qsglistview/data/listview-sections_delegate.qml +++ b/tests/auto/declarative/qquicklistview/data/listview-sections_delegate.qml diff --git a/tests/auto/declarative/qsglistview/data/listviewtest.qml b/tests/auto/declarative/qquicklistview/data/listviewtest.qml index 0202de1546..0202de1546 100644 --- a/tests/auto/declarative/qsglistview/data/listviewtest.qml +++ b/tests/auto/declarative/qquicklistview/data/listviewtest.qml diff --git a/tests/auto/declarative/qsglistview/data/manual-highlight.qml b/tests/auto/declarative/qquicklistview/data/manual-highlight.qml index aac4599f01..aac4599f01 100644 --- a/tests/auto/declarative/qsglistview/data/manual-highlight.qml +++ b/tests/auto/declarative/qquicklistview/data/manual-highlight.qml diff --git a/tests/auto/declarative/qsglistview/data/margins.qml b/tests/auto/declarative/qquicklistview/data/margins.qml index 19bbef500f..19bbef500f 100644 --- a/tests/auto/declarative/qsglistview/data/margins.qml +++ b/tests/auto/declarative/qquicklistview/data/margins.qml diff --git a/tests/auto/declarative/qsglistview/data/propertychangestest.qml b/tests/auto/declarative/qquicklistview/data/propertychangestest.qml index 146f3f13b0..146f3f13b0 100644 --- a/tests/auto/declarative/qsglistview/data/propertychangestest.qml +++ b/tests/auto/declarative/qquicklistview/data/propertychangestest.qml diff --git a/tests/auto/declarative/qsglistview/data/qtbug-21742.qml b/tests/auto/declarative/qquicklistview/data/qtbug-21742.qml index 774f9041fb..774f9041fb 100644 --- a/tests/auto/declarative/qsglistview/data/qtbug-21742.qml +++ b/tests/auto/declarative/qquicklistview/data/qtbug-21742.qml diff --git a/tests/auto/declarative/qsglistview/data/qtbug14821.qml b/tests/auto/declarative/qquicklistview/data/qtbug14821.qml index 0a5e0acbb4..0a5e0acbb4 100644 --- a/tests/auto/declarative/qsglistview/data/qtbug14821.qml +++ b/tests/auto/declarative/qquicklistview/data/qtbug14821.qml diff --git a/tests/auto/declarative/qsglistview/data/qtbug16037.qml b/tests/auto/declarative/qquicklistview/data/qtbug16037.qml index 21faeb3f32..21faeb3f32 100644 --- a/tests/auto/declarative/qsglistview/data/qtbug16037.qml +++ b/tests/auto/declarative/qquicklistview/data/qtbug16037.qml diff --git a/tests/auto/declarative/qsglistview/data/resizeview.qml b/tests/auto/declarative/qquicklistview/data/resizeview.qml index 071cdedf2e..071cdedf2e 100644 --- a/tests/auto/declarative/qsglistview/data/resizeview.qml +++ b/tests/auto/declarative/qquicklistview/data/resizeview.qml diff --git a/tests/auto/declarative/qsglistview/data/rightToLeft.qml b/tests/auto/declarative/qquicklistview/data/rightToLeft.qml index 6d77de26f4..6d77de26f4 100644 --- a/tests/auto/declarative/qsglistview/data/rightToLeft.qml +++ b/tests/auto/declarative/qquicklistview/data/rightToLeft.qml diff --git a/tests/auto/declarative/qsglistview/data/sizelessthan1.qml b/tests/auto/declarative/qquicklistview/data/sizelessthan1.qml index aa9dc20ae9..aa9dc20ae9 100644 --- a/tests/auto/declarative/qsglistview/data/sizelessthan1.qml +++ b/tests/auto/declarative/qquicklistview/data/sizelessthan1.qml diff --git a/tests/auto/declarative/qsglistview/data/snapToItem.qml b/tests/auto/declarative/qquicklistview/data/snapToItem.qml index 6f201072f0..6f201072f0 100644 --- a/tests/auto/declarative/qsglistview/data/snapToItem.qml +++ b/tests/auto/declarative/qquicklistview/data/snapToItem.qml diff --git a/tests/auto/declarative/qsglistview/data/strictlyenforcerange.qml b/tests/auto/declarative/qquicklistview/data/strictlyenforcerange.qml index 7960ac4abb..7960ac4abb 100644 --- a/tests/auto/declarative/qsglistview/data/strictlyenforcerange.qml +++ b/tests/auto/declarative/qquicklistview/data/strictlyenforcerange.qml diff --git a/tests/auto/declarative/qsglistview/incrementalmodel.cpp b/tests/auto/declarative/qquicklistview/incrementalmodel.cpp index 53d30915f5..53d30915f5 100644 --- a/tests/auto/declarative/qsglistview/incrementalmodel.cpp +++ b/tests/auto/declarative/qquicklistview/incrementalmodel.cpp diff --git a/tests/auto/declarative/qsglistview/incrementalmodel.h b/tests/auto/declarative/qquicklistview/incrementalmodel.h index a6cddb6b07..a6cddb6b07 100644 --- a/tests/auto/declarative/qsglistview/incrementalmodel.h +++ b/tests/auto/declarative/qquicklistview/incrementalmodel.h diff --git a/tests/auto/declarative/qsglistview/qsglistview.pro b/tests/auto/declarative/qquicklistview/qquicklistview.pro index 3322f30dd9..a047651d39 100644 --- a/tests/auto/declarative/qsglistview/qsglistview.pro +++ b/tests/auto/declarative/qquicklistview/qquicklistview.pro @@ -1,9 +1,9 @@ CONFIG += testcase -TARGET = tst_qsglistview +TARGET = tst_qquicklistview macx:CONFIG -= app_bundle HEADERS += incrementalmodel.h -SOURCES += tst_qsglistview.cpp incrementalmodel.cpp +SOURCES += tst_qquicklistview.cpp incrementalmodel.cpp testDataFiles.files = data testDataFiles.path = . diff --git a/tests/auto/declarative/qsglistview/tst_qsglistview.cpp b/tests/auto/declarative/qquicklistview/tst_qquicklistview.cpp index 8e2375d6b5..ae37724492 100644 --- a/tests/auto/declarative/qsglistview/tst_qsglistview.cpp +++ b/tests/auto/declarative/qquicklistview/tst_qquicklistview.cpp @@ -41,14 +41,14 @@ #include <QtTest/QtTest> #include <QtWidgets/QStringListModel> -#include <QtDeclarative/qsgview.h> +#include <QtDeclarative/qquickview.h> #include <QtDeclarative/qdeclarativeengine.h> #include <QtDeclarative/qdeclarativecontext.h> #include <QtDeclarative/qdeclarativeexpression.h> -#include <QtDeclarative/private/qsgitem_p.h> -#include <QtDeclarative/private/qsglistview_p.h> -#include <QtDeclarative/private/qsgtext_p.h> -#include <QtDeclarative/private/qsgvisualitemmodel_p.h> +#include <QtDeclarative/private/qquickitem_p.h> +#include <QtDeclarative/private/qquicklistview_p.h> +#include <QtDeclarative/private/qquicktext_p.h> +#include <QtDeclarative/private/qquickvisualitemmodel_p.h> #include <QtDeclarative/private/qdeclarativelistmodel_p.h> #include <QtDeclarative/private/qlistmodelinterface_p.h> #include <QtDeclarative/private/qdeclarativechangeset_p.h> @@ -57,13 +57,13 @@ #include <math.h> Q_DECLARE_METATYPE(Qt::LayoutDirection) -Q_DECLARE_METATYPE(QSGListView::Orientation) +Q_DECLARE_METATYPE(QQuickListView::Orientation) -class tst_QSGListView : public QObject +class tst_QQuickListView : public QObject { Q_OBJECT public: - tst_QSGListView(); + tst_QQuickListView(); private slots: void initTestCase(); @@ -153,24 +153,24 @@ private: template <class T> void removed(bool animated); template <class T> void moved(); template <class T> void clear(); - QSGView *createView(); - void flick(QSGView *canvas, const QPoint &from, const QPoint &to, int duration); - QSGItem *findVisibleChild(QSGItem *parent, const QString &objectName); + QQuickView *createView(); + void flick(QQuickView *canvas, const QPoint &from, const QPoint &to, int duration); + QQuickItem *findVisibleChild(QQuickItem *parent, const QString &objectName); template<typename T> - T *findItem(QSGItem *parent, const QString &id, int index=-1); + T *findItem(QQuickItem *parent, const QString &id, int index=-1); template<typename T> - QList<T*> findItems(QSGItem *parent, const QString &objectName); - void dumpTree(QSGItem *parent, int depth = 0); + QList<T*> findItems(QQuickItem *parent, const QString &objectName); + void dumpTree(QQuickItem *parent, int depth = 0); void inserted_more_data(); void moved_data(); }; -void tst_QSGListView::initTestCase() +void tst_QQuickListView::initTestCase() { } -void tst_QSGListView::cleanupTestCase() +void tst_QQuickListView::cleanupTestCase() { } @@ -214,7 +214,7 @@ public: }; template<typename T> -void tst_qsglistview_move(int from, int to, int n, T *items) +void tst_qquicklistview_move(int from, int to, int n, T *items) { if (from > to) { // Only move forwards - flip if backwards moving @@ -332,7 +332,7 @@ public: } void moveItems(int from, int to, int count) { - tst_qsglistview_move(from, to, count, &list); + tst_qquicklistview_move(from, to, count, &list); emit itemsMoved(from, to, count); } @@ -426,7 +426,7 @@ public: void moveItems(int from, int to, int count) { emit beginMoveRows(QModelIndex(), from, from+count-1, QModelIndex(), to > from ? to+count : to); - tst_qsglistview_move(from, to, count, &list); + tst_qquicklistview_move(from, to, count, &list); emit endMoveRows(); } @@ -446,14 +446,14 @@ private: QList<QPair<QString,QString> > list; }; -tst_QSGListView::tst_QSGListView() +tst_QQuickListView::tst_QQuickListView() { } |