aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativestates
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativestates')
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicExtension.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/deleting.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/deletingState.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/editProperties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/explicit.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/extendsBug.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/illegalObj.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/legalTempState.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange4.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange5.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange6.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/reset.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/returnToBase.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/script.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverride.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/urlResolution.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro2
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp393
52 files changed, 248 insertions, 247 deletions
diff --git a/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml b/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml
index d91f504455..1ea346b841 100644
--- a/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: extendedRect
objectName: "extendedRect"
diff --git a/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml b/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml
index 6ad3b4a6ba..01eb32cd4d 100644
--- a/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Item {
Column {
diff --git a/tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml b/tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml
index 7f9ddbfa2d..5ba7c3ad6f 100644
--- a/tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 1024
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml
index fad27080fe..378f5390f9 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: container
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml
index e1d4d66abd..dc7f8ef0d1 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
index 116b844489..af49575854 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: container
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml
index eaff37345b..28b55818bd 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
index ea7b251151..b1ca968fb9 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 200; height: 200
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml
index ca96da8855..9af0e4645a 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: container
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml
index 6277111e68..6512533b37 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: container
color: "red"
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml
index d8b02e9b32..574ef473ce 100644
--- a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: root
diff --git a/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml
index 2cad0504b2..413af2ee42 100644
--- a/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import QtQuick 1.0
+import QtQuick 2.0
Item {
id: item
diff --git a/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml b/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml
index ccd126f6a7..6cbf524ec2 100644
--- a/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Item {
id: root
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml
index 2060f03009..59b67d0863 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml
index a329da33dd..55f88120aa 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml
index cb054d214d..361ab0b091 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml
index 7a740e570c..b29f0fcf22 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml
index 08ce7875f0..3e2b73acde 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml
index ab97ba18b5..5ff46cc60c 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml
index 73ac34d7ff..e46e98f75e 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml
index b5df922190..7da1e0fb2e 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml
@@ -1,5 +1,5 @@
import Qt.test 1.0
-import QtQuick 1.0
+import QtQuick 2.0
MyRectangle {
id: rect
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml b/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml
index 58c9fbe231..00f5fee287 100644
--- a/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/deleting.qml b/tests/auto/declarative/qdeclarativestates/data/deleting.qml
index d1b3fd3a10..b8e8d33c17 100644
--- a/tests/auto/declarative/qdeclarativestates/data/deleting.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/deleting.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/deletingState.qml b/tests/auto/declarative/qdeclarativestates/data/deletingState.qml
index 654e09cb2e..68a9c2a24d 100644
--- a/tests/auto/declarative/qdeclarativestates/data/deletingState.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/deletingState.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/editProperties.qml b/tests/auto/declarative/qdeclarativestates/data/editProperties.qml
index 08d0209615..9bff3657ba 100644
--- a/tests/auto/declarative/qdeclarativestates/data/editProperties.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/editProperties.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/explicit.qml b/tests/auto/declarative/qdeclarativestates/data/explicit.qml
index 426731914f..d09893a1db 100644
--- a/tests/auto/declarative/qdeclarativestates/data/explicit.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/explicit.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
property color sourceColor: "blue"
diff --git a/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml b/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml
index a4b77b122e..573341520d 100644
--- a/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 200
diff --git a/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml b/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml
index a98c96bedc..6a5c7003f6 100644
--- a/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml b/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml
index e6444325a3..a2bbd5d32b 100644
--- a/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myItem
diff --git a/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml
index c04b03c94b..9cb39c0728 100644
--- a/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: card
diff --git a/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml
index 4d500d9e05..a93860f5cc 100644
--- a/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: card
diff --git a/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml b/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml
index 4973b82c3f..ce502699bb 100644
--- a/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml
index 2f7e80eb08..663ad1a264 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml
index bdd0c6c282..ae290e961e 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: newParent
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml
index 55f3ead7c6..46665cb4c8 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml
index ae05b05072..22de72f8c9 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml
index 32a0b91cd9..c353d2637f 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange6.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange6.qml
index 70ad894ffc..b373dbba20 100644
--- a/tests/auto/declarative/qdeclarativestates/data/parentChange6.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange6.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 400; height: 400
diff --git a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
index 3ab3c3252e..ddd636493d 100644
--- a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml
index a140ffab4d..f0ecab0950 100644
--- a/tests/auto/declarative/qdeclarativestates/data/reset.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
width: 640
diff --git a/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml b/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml
index dfd7c1794a..950a522841 100644
--- a/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml
index a0d053cf03..9a0ee82397 100644
--- a/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: theRect
diff --git a/tests/auto/declarative/qdeclarativestates/data/script.qml b/tests/auto/declarative/qdeclarativestates/data/script.qml
index 630aaf0ffa..218f0fae74 100644
--- a/tests/auto/declarative/qdeclarativestates/data/script.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/script.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRectangle
width: 100; height: 100
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml
index 0eaf547644..9ab8037e51 100644
--- a/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
import Qt.test 1.0
MyRectangle {
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml
index ef26ff14e7..4e5e335b8b 100644
--- a/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
import Qt.test 1.0
MyRectangle {
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml
index 8e9b698383..3e2ae1e93d 100644
--- a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
import Qt.test 1.0
MyRectangle {
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml
index 74df9430c3..3937874aa2 100644
--- a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: myRect
diff --git a/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml b/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml
index 4425b4dd49..35eacff07b 100644
--- a/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
id: theRect
diff --git a/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml b/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml
index 743f5404b0..516ac034d6 100644
--- a/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
import "Implementation"
Rectangle {
diff --git a/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml b/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml
index 48aef5a6ce..92025a2054 100644
--- a/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.0
+import QtQuick 2.0
Rectangle {
property bool condition1: false
diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
index 2efefed56b..c34b8d8319 100644
--- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
+++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
@@ -13,4 +13,4 @@ symbian: {
}
CONFIG += parallel_test
-QT += core-private gui-private declarative-private script-private
+QT += core-private gui-private declarative-private script-private opengl-private
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index 9fafa7d1fd..a59ca2607f 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -41,12 +41,13 @@
#include <qtest.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
-#include <private/qdeclarativeanchors_p_p.h>
-#include <private/qdeclarativerectangle_p.h>
-#include <private/qdeclarativeimage_p.h>
+#include <private/qsgstateoperations_p.h>
+#include <private/qsganchors_p_p.h>
+#include <private/qsgrectangle_p.h>
+#include <private/qsgimage_p.h>
#include <private/qdeclarativepropertychanges_p.h>
#include <private/qdeclarativestategroup_p.h>
-#include <private/qdeclarativeitem_p.h>
+#include <private/qsgitem_p.h>
#include <private/qdeclarativeproperty_p.h>
#ifdef Q_OS_SYMBIAN
@@ -68,7 +69,7 @@ private:
int m_foo;
};
-class MyRect : public QDeclarativeRectangle
+class MyRect : public QSGRectangle
{
Q_OBJECT
Q_PROPERTY(int propertyWithNotify READ propertyWithNotify WRITE setPropertyWithNotify NOTIFY oddlyNamedNotifySignal)
@@ -164,8 +165,8 @@ void tst_qdeclarativestates::basicChanges()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -179,8 +180,8 @@ void tst_qdeclarativestates::basicChanges()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges2.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -200,33 +201,33 @@ void tst_qdeclarativestates::basicChanges()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges3.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
rectPrivate->setState("bordered");
QCOMPARE(rect->color(),QColor("red"));
- QCOMPARE(rect->border()->width(),2);
+ QCOMPARE(rect->border()->width(),2.0);
rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
//### we should be checking that this is an implicit rather than explicit 1 (which currently fails)
rectPrivate->setState("bordered");
QCOMPARE(rect->color(),QColor("red"));
- QCOMPARE(rect->border()->width(),2);
+ QCOMPARE(rect->border()->width(),2.0);
rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
}
@@ -260,7 +261,7 @@ void tst_qdeclarativestates::attachedPropertyChanges()
QDeclarativeComponent component(&engine, SRCDIR "/data/attachedPropertyChanges.qml");
QVERIFY(component.isReady());
- QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QSGItem *item = qobject_cast<QSGItem*>(component.create());
QVERIFY(item != 0);
QCOMPARE(item->width(), 50.0);
@@ -280,42 +281,42 @@ void tst_qdeclarativestates::basicExtension()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicExtension.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
rectPrivate->setState("bordered");
QCOMPARE(rect->color(),QColor("blue"));
- QCOMPARE(rect->border()->width(),2);
+ QCOMPARE(rect->border()->width(),2.0);
rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
rectPrivate->setState("bordered");
QCOMPARE(rect->color(),QColor("blue"));
- QCOMPARE(rect->border()->width(),2);
+ QCOMPARE(rect->border()->width(),2.0);
rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
- QCOMPARE(rect->border()->width(),1);
+ QCOMPARE(rect->border()->width(),1.0);
}
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/fakeExtension.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -346,8 +347,8 @@ void tst_qdeclarativestates::basicBinding()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -374,8 +375,8 @@ void tst_qdeclarativestates::basicBinding()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding2.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -405,8 +406,8 @@ void tst_qdeclarativestates::basicBinding()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding3.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -430,8 +431,8 @@ void tst_qdeclarativestates::basicBinding()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding4.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
@@ -470,7 +471,7 @@ void tst_qdeclarativestates::signalOverride()
rect->doSomething();
QCOMPARE(rect->color(),QColor("blue"));
- QDeclarativeItemPrivate::get(rect)->setState("green");
+ QSGItemPrivate::get(rect)->setState("green");
rect->doSomething();
QCOMPARE(rect->color(),QColor("green"));
}
@@ -484,8 +485,8 @@ void tst_qdeclarativestates::signalOverride()
rect->doSomething();
QCOMPARE(rect->color(),QColor("blue"));
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("extendedRect"));
- QDeclarativeItemPrivate::get(innerRect)->setState("green");
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("extendedRect"));
+ QSGItemPrivate::get(innerRect)->setState("green");
rect->doSomething();
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(innerRect->color(),QColor("green"));
@@ -501,7 +502,7 @@ void tst_qdeclarativestates::signalOverrideCrash()
MyRect *rect = qobject_cast<MyRect*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate::get(rect)->setState("overridden");
+ QSGItemPrivate::get(rect)->setState("overridden");
rect->doSomething();
}
@@ -510,12 +511,12 @@ void tst_qdeclarativestates::signalOverrideCrash2()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/signalOverrideCrash2.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate::get(rect)->setState("state1");
- QDeclarativeItemPrivate::get(rect)->setState("state2");
- QDeclarativeItemPrivate::get(rect)->setState("state1");
+ QSGItemPrivate::get(rect)->setState("state1");
+ QSGItemPrivate::get(rect)->setState("state2");
+ QSGItemPrivate::get(rect)->setState("state1");
delete rect;
}
@@ -526,10 +527,10 @@ void tst_qdeclarativestates::parentChange()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange1.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
QDeclarativeListReference list(rect, "states");
@@ -537,14 +538,14 @@ void tst_qdeclarativestates::parentChange()
QVERIFY(state != 0);
qmlExecuteDeferred(state);
- QDeclarativeParentChange *pChange = qobject_cast<QDeclarativeParentChange*>(state->operationAt(0));
+ QSGParentChange *pChange = qobject_cast<QSGParentChange*>(state->operationAt(0));
QVERIFY(pChange != 0);
- QDeclarativeItem *nParent = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("NewParent"));
+ QSGItem *nParent = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("NewParent"));
QVERIFY(nParent != 0);
QCOMPARE(pChange->parent(), nParent);
- QDeclarativeItemPrivate::get(rect)->setState("reparented");
+ QSGItemPrivate::get(rect)->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
QCOMPARE(innerRect->x(), qreal(-133));
@@ -553,10 +554,10 @@ void tst_qdeclarativestates::parentChange()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange2.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
rectPrivate->setState("reparented");
@@ -568,10 +569,10 @@ void tst_qdeclarativestates::parentChange()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange3.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
rectPrivate->setState("reparented");
@@ -590,13 +591,13 @@ void tst_qdeclarativestates::parentChange()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange6.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- QDeclarativeItemPrivate::get(rect)->setState("reparented");
+ QSGItemPrivate::get(rect)->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(180));
QCOMPARE(innerRect->scale(), qreal(1));
QCOMPARE(innerRect->x(), qreal(-105));
@@ -610,14 +611,14 @@ void tst_qdeclarativestates::parentChangeErrors()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange4.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/parentChange4.qml") + ":25:9: QML ParentChange: Unable to preserve appearance under non-uniform scale");
- QDeclarativeItemPrivate::get(rect)->setState("reparented");
+ QSGItemPrivate::get(rect)->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
QCOMPARE(innerRect->x(), qreal(5));
@@ -626,14 +627,14 @@ void tst_qdeclarativestates::parentChangeErrors()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange5.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/parentChange5.qml") + ":25:9: QML ParentChange: Unable to preserve appearance under complex transform");
- QDeclarativeItemPrivate::get(rect)->setState("reparented");
+ QSGItemPrivate::get(rect)->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
QCOMPARE(innerRect->x(), qreal(5));
@@ -646,11 +647,11 @@ void tst_qdeclarativestates::anchorChanges()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges1.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
QDeclarativeListReference list(rect, "states");
@@ -658,15 +659,15 @@ void tst_qdeclarativestates::anchorChanges()
QVERIFY(state != 0);
qmlExecuteDeferred(state);
- QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
rectPrivate->setState("right");
QCOMPARE(innerRect->x(), qreal(150));
- QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QDeclarativeAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all)
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine);
+ 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);
rectPrivate->setState("");
QCOMPARE(innerRect->x(), qreal(5));
@@ -679,11 +680,11 @@ void tst_qdeclarativestates::anchorChanges2()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges2.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
rectPrivate->setState("right");
@@ -700,17 +701,17 @@ void tst_qdeclarativestates::anchorChanges3()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges3.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- QDeclarativeItem *leftGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("LeftGuideline"));
+ QSGItem *leftGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("LeftGuideline"));
QVERIFY(leftGuideline != 0);
- QDeclarativeItem *bottomGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("BottomGuideline"));
+ QSGItem *bottomGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("BottomGuideline"));
QVERIFY(bottomGuideline != 0);
QDeclarativeListReference list(rect, "states");
@@ -718,19 +719,19 @@ void tst_qdeclarativestates::anchorChanges3()
QVERIFY(state != 0);
qmlExecuteDeferred(state);
- QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
rectPrivate->setState("reanchored");
- QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().item, QDeclarativeItemPrivate::get(leftGuideline)->left().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QDeclarativeItemPrivate::get(leftGuideline)->left().anchorLine);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->top().item, rectPrivate->top().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->top().anchorLine, rectPrivate->top().anchorLine);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->bottom().item, QDeclarativeItemPrivate::get(bottomGuideline)->bottom().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->bottom().anchorLine, QDeclarativeItemPrivate::get(bottomGuideline)->bottom().anchorLine);
+ 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(innerRect->x(), qreal(10));
QCOMPARE(innerRect->y(), qreal(0));
@@ -751,16 +752,16 @@ void tst_qdeclarativestates::anchorChanges4()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges4.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- QDeclarativeItem *leftGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("LeftGuideline"));
+ QSGItem *leftGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("LeftGuideline"));
QVERIFY(leftGuideline != 0);
- QDeclarativeItem *bottomGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("BottomGuideline"));
+ QSGItem *bottomGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("BottomGuideline"));
QVERIFY(bottomGuideline != 0);
QDeclarativeListReference list(rect, "states");
@@ -768,15 +769,15 @@ void tst_qdeclarativestates::anchorChanges4()
QVERIFY(state != 0);
qmlExecuteDeferred(state);
- QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
- QDeclarativeItemPrivate::get(rect)->setState("reanchored");
- QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->horizontalCenter().item, QDeclarativeItemPrivate::get(bottomGuideline)->horizontalCenter().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->horizontalCenter().anchorLine, QDeclarativeItemPrivate::get(bottomGuideline)->horizontalCenter().anchorLine);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->verticalCenter().item, QDeclarativeItemPrivate::get(leftGuideline)->verticalCenter().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->verticalCenter().anchorLine, QDeclarativeItemPrivate::get(leftGuideline)->verticalCenter().anchorLine);
+ 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);
delete rect;
}
@@ -786,16 +787,16 @@ void tst_qdeclarativestates::anchorChanges5()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges5.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- QDeclarativeItem *leftGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("LeftGuideline"));
+ QSGItem *leftGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("LeftGuideline"));
QVERIFY(leftGuideline != 0);
- QDeclarativeItem *bottomGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("BottomGuideline"));
+ QSGItem *bottomGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("BottomGuideline"));
QVERIFY(bottomGuideline != 0);
QDeclarativeListReference list(rect, "states");
@@ -803,11 +804,11 @@ void tst_qdeclarativestates::anchorChanges5()
QVERIFY(state != 0);
qmlExecuteDeferred(state);
- QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
- QDeclarativeItemPrivate::get(rect)->setState("reanchored");
- QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
+ QSGItemPrivate::get(rect)->setState("reanchored");
+ QCOMPARE(aChanges->object(), qobject_cast<QSGItem*>(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);
@@ -816,12 +817,12 @@ void tst_qdeclarativestates::anchorChanges5()
delete rect;
}
-void mirrorAnchors(QDeclarativeItem *item) {
- QDeclarativeItemPrivate *itemPrivate = QDeclarativeItemPrivate::get(item);
+void mirrorAnchors(QSGItem *item) {
+ QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item);
itemPrivate->setLayoutMirror(true);
}
-qreal offsetRTL(QDeclarativeItem *anchorItem, QDeclarativeItem *item) {
+qreal offsetRTL(QSGItem *anchorItem, QSGItem *item) {
return anchorItem->width()+2*anchorItem->x()-item->width();
}
@@ -830,11 +831,11 @@ void tst_qdeclarativestates::anchorChangesRTL()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges1.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
mirrorAnchors(innerRect);
@@ -843,15 +844,15 @@ void tst_qdeclarativestates::anchorChangesRTL()
QVERIFY(state != 0);
qmlExecuteDeferred(state);
- QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
rectPrivate->setState("right");
QCOMPARE(innerRect->x(), offsetRTL(rect, innerRect) - qreal(150));
- QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QDeclarativeAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all)
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine);
+ 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);
rectPrivate->setState("");
QCOMPARE(innerRect->x(), offsetRTL(rect, innerRect) -qreal(5));
@@ -864,11 +865,11 @@ void tst_qdeclarativestates::anchorChangesRTL2()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges2.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
mirrorAnchors(innerRect);
@@ -886,18 +887,18 @@ void tst_qdeclarativestates::anchorChangesRTL3()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges3.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
- QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QSGRectangle *innerRect = qobject_cast<QSGRectangle*>(rect->findChild<QSGRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
mirrorAnchors(innerRect);
- QDeclarativeItem *leftGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("LeftGuideline"));
+ QSGItem *leftGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("LeftGuideline"));
QVERIFY(leftGuideline != 0);
- QDeclarativeItem *bottomGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("BottomGuideline"));
+ QSGItem *bottomGuideline = qobject_cast<QSGItem*>(rect->findChild<QSGItem*>("BottomGuideline"));
QVERIFY(bottomGuideline != 0);
QDeclarativeListReference list(rect, "states");
@@ -905,19 +906,19 @@ void tst_qdeclarativestates::anchorChangesRTL3()
QVERIFY(state != 0);
qmlExecuteDeferred(state);
- QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QSGAnchorChanges *aChanges = qobject_cast<QSGAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
rectPrivate->setState("reanchored");
- QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().item, QDeclarativeItemPrivate::get(leftGuideline)->left().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QDeclarativeItemPrivate::get(leftGuideline)->left().anchorLine);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->top().item, rectPrivate->top().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->top().anchorLine, rectPrivate->top().anchorLine);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->bottom().item, QDeclarativeItemPrivate::get(bottomGuideline)->bottom().item);
- QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->bottom().anchorLine, QDeclarativeItemPrivate::get(bottomGuideline)->bottom().anchorLine);
+ 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(innerRect->x(), offsetRTL(leftGuideline, innerRect) - qreal(10));
QCOMPARE(innerRect->y(), qreal(0));
@@ -941,10 +942,10 @@ void tst_qdeclarativestates::anchorChangesCrash()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChangesCrash.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate::get(rect)->setState("reanchored");
+ QSGItemPrivate::get(rect)->setState("reanchored");
delete rect;
}
@@ -955,29 +956,29 @@ void tst_qdeclarativestates::anchorRewindBug()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorRewindBug.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItem * column = rect->findChild<QDeclarativeItem*>("column");
+ QSGItem * column = rect->findChild<QSGItem*>("column");
QVERIFY(column != 0);
- QVERIFY(!QDeclarativeItemPrivate::get(column)->heightValid);
- QVERIFY(!QDeclarativeItemPrivate::get(column)->widthValid);
+ QVERIFY(!QSGItemPrivate::get(column)->heightValid);
+ QVERIFY(!QSGItemPrivate::get(column)->widthValid);
QCOMPARE(column->height(), 200.0);
- QDeclarativeItemPrivate::get(rect)->setState("reanchored");
+ QSGItemPrivate::get(rect)->setState("reanchored");
// column height and width should stay implicit
// and column's implicit resizing should still work
- QVERIFY(!QDeclarativeItemPrivate::get(column)->heightValid);
- QVERIFY(!QDeclarativeItemPrivate::get(column)->widthValid);
+ QVERIFY(!QSGItemPrivate::get(column)->heightValid);
+ QVERIFY(!QSGItemPrivate::get(column)->widthValid);
QCOMPARE(column->height(), 100.0);
- QDeclarativeItemPrivate::get(rect)->setState("");
+ QSGItemPrivate::get(rect)->setState("");
// column height and width should stay implicit
// and column's implicit resizing should still work
- QVERIFY(!QDeclarativeItemPrivate::get(column)->heightValid);
- QVERIFY(!QDeclarativeItemPrivate::get(column)->widthValid);
+ QVERIFY(!QSGItemPrivate::get(column)->heightValid);
+ QVERIFY(!QSGItemPrivate::get(column)->widthValid);
QCOMPARE(column->height(), 200.0);
delete rect;
@@ -989,20 +990,20 @@ void tst_qdeclarativestates::anchorRewindBug2()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorRewindBug2.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeRectangle *mover = rect->findChild<QDeclarativeRectangle*>("mover");
+ QSGRectangle *mover = rect->findChild<QSGRectangle*>("mover");
QVERIFY(mover != 0);
QCOMPARE(mover->y(), qreal(0.0));
QCOMPARE(mover->width(), qreal(50.0));
- QDeclarativeItemPrivate::get(rect)->setState("anchored");
+ QSGItemPrivate::get(rect)->setState("anchored");
QCOMPARE(mover->y(), qreal(250.0));
QCOMPARE(mover->width(), qreal(200.0));
- QDeclarativeItemPrivate::get(rect)->setState("");
+ QSGItemPrivate::get(rect)->setState("");
QCOMPARE(mover->y(), qreal(0.0));
QCOMPARE(mover->width(), qreal(50.0));
@@ -1015,9 +1016,9 @@ void tst_qdeclarativestates::script()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/script.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QCOMPARE(rect->color(),QColor("red"));
rectPrivate->setState("blue");
@@ -1033,9 +1034,9 @@ void tst_qdeclarativestates::restoreEntryValues()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/restoreEntryValues.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QCOMPARE(rect->color(),QColor("red"));
rectPrivate->setState("blue");
@@ -1050,9 +1051,9 @@ void tst_qdeclarativestates::explicitChanges()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/explicit.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QDeclarativeListReference list(rect, "states");
QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0));
QVERIFY(state != 0);
@@ -1083,14 +1084,14 @@ void tst_qdeclarativestates::propertyErrors()
{
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/propertyErrors.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\"");
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to read-only property \"activeFocus\"");
- QDeclarativeItemPrivate::get(rect)->setState("blue");
+ QSGItemPrivate::get(rect)->setState("blue");
}
void tst_qdeclarativestates::incorrectRestoreBug()
@@ -1098,9 +1099,9 @@ void tst_qdeclarativestates::incorrectRestoreBug()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QCOMPARE(rect->color(),QColor("red"));
rectPrivate->setState("blue");
@@ -1141,9 +1142,9 @@ void tst_qdeclarativestates::deletingChange()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/deleting.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(rect->radius(),qreal(5));
@@ -1173,7 +1174,7 @@ void tst_qdeclarativestates::deletingState()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/deletingState.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
QDeclarativeStateGroup *sg = rect->findChild<QDeclarativeStateGroup*>();
@@ -1204,9 +1205,9 @@ void tst_qdeclarativestates::tempState()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/legalTempState.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QTest::ignoreMessage(QtDebugMsg, "entering placed");
QTest::ignoreMessage(QtDebugMsg, "entering idle");
rectPrivate->setState("placed");
@@ -1218,9 +1219,9 @@ void tst_qdeclarativestates::illegalTempState()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/illegalTempState.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::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"));
@@ -1231,9 +1232,9 @@ void tst_qdeclarativestates::nonExistantProperty()
QDeclarativeEngine engine;
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/nonExistantProp.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/nonExistantProp.qml") + ":9:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\"");
rectPrivate->setState("blue");
QCOMPARE(rectPrivate->state(), QLatin1String("blue"));
@@ -1244,15 +1245,15 @@ void tst_qdeclarativestates::reset()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, SRCDIR "/data/reset.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeImage *image = rect->findChild<QDeclarativeImage*>();
+ QSGImage *image = rect->findChild<QSGImage*>();
QVERIFY(image != 0);
QCOMPARE(image->width(), qreal(40.));
QCOMPARE(image->height(), qreal(20.));
- QDeclarativeItemPrivate::get(rect)->setState("state1");
+ QSGItemPrivate::get(rect)->setState("state1");
QCOMPARE(image->width(), 20.0);
QCOMPARE(image->height(), qreal(20.));
@@ -1276,9 +1277,9 @@ void tst_qdeclarativestates::whenOrdering()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, SRCDIR "/data/whenOrdering.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QCOMPARE(rectPrivate->state(), QLatin1String(""));
rect->setProperty("condition2", true);
@@ -1299,16 +1300,16 @@ void tst_qdeclarativestates::urlResolution()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, SRCDIR "/data/urlResolution.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeItem *myType = rect->findChild<QDeclarativeItem*>("MyType");
- QDeclarativeImage *image1 = rect->findChild<QDeclarativeImage*>("image1");
- QDeclarativeImage *image2 = rect->findChild<QDeclarativeImage*>("image2");
- QDeclarativeImage *image3 = rect->findChild<QDeclarativeImage*>("image3");
+ QSGItem *myType = rect->findChild<QSGItem*>("MyType");
+ QSGImage *image1 = rect->findChild<QSGImage*>("image1");
+ QSGImage *image2 = rect->findChild<QSGImage*>("image2");
+ QSGImage *image3 = rect->findChild<QSGImage*>("image3");
QVERIFY(myType != 0 && image1 != 0 && image2 != 0 && image3 != 0);
- QDeclarativeItemPrivate::get(myType)->setState("SetImageState");
+ QSGItemPrivate::get(myType)->setState("SetImageState");
QUrl resolved = QUrl::fromLocalFile(SRCDIR "/data/Implementation/images/qt-logo.png");
QCOMPARE(image1->source(), resolved);
QCOMPARE(image2->source(), resolved);
@@ -1320,9 +1321,9 @@ void tst_qdeclarativestates::unnamedWhen()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, SRCDIR "/data/unnamedWhen.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QCOMPARE(rectPrivate->state(), QLatin1String(""));
QCOMPARE(rect->property("stateString").toString(), QLatin1String(""));
@@ -1339,9 +1340,9 @@ void tst_qdeclarativestates::returnToBase()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, SRCDIR "/data/returnToBase.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QCOMPARE(rectPrivate->state(), QLatin1String(""));
QCOMPARE(rect->property("stateString").toString(), QLatin1String(""));
@@ -1359,10 +1360,10 @@ void tst_qdeclarativestates::extendsBug()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, SRCDIR "/data/extendsBug.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
- QDeclarativeRectangle *greenRect = rect->findChild<QDeclarativeRectangle*>("greenRect");
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
+ QSGRectangle *greenRect = rect->findChild<QSGRectangle*>("greenRect");
rectPrivate->setState("b");
QCOMPARE(greenRect->x(), qreal(100));
@@ -1374,10 +1375,10 @@ void tst_qdeclarativestates::editProperties()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, SRCDIR "/data/editProperties.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QSGItemPrivate *rectPrivate = QSGItemPrivate::get(rect);
QDeclarativeStateGroup *stateGroup = rectPrivate->_states();
QVERIFY(stateGroup != 0);
@@ -1397,7 +1398,7 @@ void tst_qdeclarativestates::editProperties()
QDeclarativePropertyChanges *propertyChangesGreen = qobject_cast<QDeclarativePropertyChanges*>(greenState->operationAt(0));
QVERIFY(propertyChangesGreen != 0);
- QDeclarativeRectangle *childRect = rect->findChild<QDeclarativeRectangle*>("rect2");
+ QSGRectangle *childRect = rect->findChild<QSGRectangle*>("rect2");
QVERIFY(childRect != 0);
QCOMPARE(childRect->width(), qreal(402));
QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width")));
@@ -1502,9 +1503,9 @@ void tst_qdeclarativestates::QTBUG_14830()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, SRCDIR "/data/QTBUG-14830.qml");
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeItem *item = rect->findChild<QDeclarativeItem*>("area");
+ QSGItem *item = rect->findChild<QSGItem*>("area");
QCOMPARE(item->width(), qreal(171));
}