diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativestates')
6 files changed, 31 insertions, 31 deletions
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml index 7dce889..5443e54 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml @@ -16,8 +16,8 @@ Rectangle { AnchorChanges { id: ancCh target: myRect; - reset: "left" - right: container.right + anchors.left: undefined + anchors.right: container.right } } } diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml index 545345e..56de560 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml @@ -14,8 +14,8 @@ Rectangle { name: "right" AnchorChanges { target: myRect; - reset: "left" - right: parent.right + anchors.left: undefined + anchors.right: parent.right } } } diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml index 9d5b317..59c3c06 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml @@ -20,10 +20,10 @@ Rectangle { name: "reanchored" AnchorChanges { target: myRect; - left: leftGuideline.left - right: container.right - top: container.top - bottom: bottomGuideline.bottom + anchors.left: leftGuideline.left + anchors.right: container.right + anchors.top: container.top + anchors.bottom: bottomGuideline.bottom } } } diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml index f128989..7e3ba1c 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml @@ -15,8 +15,8 @@ Rectangle { name: "reanchored" AnchorChanges { target: myRect; - horizontalCenter: bottomGuideline.horizontalCenter - verticalCenter: leftGuideline.verticalCenter + anchors.horizontalCenter: bottomGuideline.horizontalCenter + anchors.verticalCenter: leftGuideline.verticalCenter } } } diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml index 4e6d34b..b85a922 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml @@ -15,8 +15,8 @@ Rectangle { name: "reanchored" AnchorChanges { target: myRect; - horizontalCenter: bottomGuideline.horizontalCenter - baseline: leftGuideline.baseline + anchors.horizontalCenter: bottomGuideline.horizontalCenter + anchors.baseline: leftGuideline.baseline } } } diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 91883c9..2ab21a4 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -564,10 +564,10 @@ void tst_qdeclarativestates::anchorChanges() rect->setState("right"); QCOMPARE(innerRect->x(), qreal(150)); - QCOMPARE(aChanges->reset(), QString("left")); + QCOMPARE(aChanges->anchors()->left().anchorLine, QDeclarativeAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all) QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); - QCOMPARE(aChanges->right().item, rect->right().item); - QCOMPARE(aChanges->right().anchorLine, rect->right().anchorLine); + QCOMPARE(aChanges->anchors()->right().item, rect->right().item); + QCOMPARE(aChanges->anchors()->right().anchorLine, rect->right().anchorLine); rect->setState(""); QCOMPARE(innerRect->x(), qreal(5)); @@ -623,14 +623,14 @@ void tst_qdeclarativestates::anchorChanges3() rect->setState("reanchored"); QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); - QCOMPARE(aChanges->left().item, leftGuideline->left().item); - QCOMPARE(aChanges->left().anchorLine, leftGuideline->left().anchorLine); - QCOMPARE(aChanges->right().item, rect->right().item); - QCOMPARE(aChanges->right().anchorLine, rect->right().anchorLine); - QCOMPARE(aChanges->top().item, rect->top().item); - QCOMPARE(aChanges->top().anchorLine, rect->top().anchorLine); - QCOMPARE(aChanges->bottom().item, bottomGuideline->bottom().item); - QCOMPARE(aChanges->bottom().anchorLine, bottomGuideline->bottom().anchorLine); + QCOMPARE(aChanges->anchors()->left().item, leftGuideline->left().item); + QCOMPARE(aChanges->anchors()->left().anchorLine, leftGuideline->left().anchorLine); + QCOMPARE(aChanges->anchors()->right().item, rect->right().item); + QCOMPARE(aChanges->anchors()->right().anchorLine, rect->right().anchorLine); + QCOMPARE(aChanges->anchors()->top().item, rect->top().item); + QCOMPARE(aChanges->anchors()->top().anchorLine, rect->top().anchorLine); + QCOMPARE(aChanges->anchors()->bottom().item, bottomGuideline->bottom().item); + QCOMPARE(aChanges->anchors()->bottom().anchorLine, bottomGuideline->bottom().anchorLine); QCOMPARE(innerRect->x(), qreal(10)); QCOMPARE(innerRect->y(), qreal(0)); @@ -673,10 +673,10 @@ void tst_qdeclarativestates::anchorChanges4() rect->setState("reanchored"); QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); - QCOMPARE(aChanges->horizontalCenter().item, bottomGuideline->horizontalCenter().item); - QCOMPARE(aChanges->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine); - QCOMPARE(aChanges->verticalCenter().item, leftGuideline->verticalCenter().item); - QCOMPARE(aChanges->verticalCenter().anchorLine, leftGuideline->verticalCenter().anchorLine); + QCOMPARE(aChanges->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item); + QCOMPARE(aChanges->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine); + QCOMPARE(aChanges->anchors()->verticalCenter().item, leftGuideline->verticalCenter().item); + QCOMPARE(aChanges->anchors()->verticalCenter().anchorLine, leftGuideline->verticalCenter().anchorLine); delete rect; } @@ -708,10 +708,10 @@ void tst_qdeclarativestates::anchorChanges5() rect->setState("reanchored"); QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); - QCOMPARE(aChanges->horizontalCenter().item, bottomGuideline->horizontalCenter().item); - QCOMPARE(aChanges->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine); - QCOMPARE(aChanges->baseline().item, leftGuideline->baseline().item); - QCOMPARE(aChanges->baseline().anchorLine, leftGuideline->baseline().anchorLine); + QCOMPARE(aChanges->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item); + QCOMPARE(aChanges->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine); + QCOMPARE(aChanges->anchors()->baseline().item, leftGuideline->baseline().item); + QCOMPARE(aChanges->anchors()->baseline().anchorLine, leftGuideline->baseline().anchorLine); delete rect; } |