diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index bd3186a..a016fa7 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -566,10 +566,10 @@ void tst_qdeclarativestates::anchorChanges() rect->setState("right"); QCOMPARE(innerRect->x(), qreal(150)); - 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->anchors()->right().item, rect->right().item); - QCOMPARE(aChanges->anchors()->right().anchorLine, rect->right().anchorLine); + QCOMPARE(aChanges->object()->anchors()->left().anchorLine, QDeclarativeAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all) + QCOMPARE(aChanges->object()->anchors()->right().item, rect->right().item); + QCOMPARE(aChanges->object()->anchors()->right().anchorLine, rect->right().anchorLine); rect->setState(""); QCOMPARE(innerRect->x(), qreal(5)); @@ -589,7 +589,6 @@ void tst_qdeclarativestates::anchorChanges2() QVERIFY(innerRect != 0); rect->setState("right"); - QEXPECT_FAIL("", "QTBUG-5338", Continue); QCOMPARE(innerRect->x(), qreal(150)); rect->setState(""); @@ -625,14 +624,14 @@ void tst_qdeclarativestates::anchorChanges3() rect->setState("reanchored"); QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); - 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(aChanges->object()->anchors()->left().item, leftGuideline->left().item); + QCOMPARE(aChanges->object()->anchors()->left().anchorLine, leftGuideline->left().anchorLine); + QCOMPARE(aChanges->object()->anchors()->right().item, rect->right().item); + QCOMPARE(aChanges->object()->anchors()->right().anchorLine, rect->right().anchorLine); + QCOMPARE(aChanges->object()->anchors()->top().item, rect->top().item); + QCOMPARE(aChanges->object()->anchors()->top().anchorLine, rect->top().anchorLine); + QCOMPARE(aChanges->object()->anchors()->bottom().item, bottomGuideline->bottom().item); + QCOMPARE(aChanges->object()->anchors()->bottom().anchorLine, bottomGuideline->bottom().anchorLine); QCOMPARE(innerRect->x(), qreal(10)); QCOMPARE(innerRect->y(), qreal(0)); @@ -675,10 +674,10 @@ void tst_qdeclarativestates::anchorChanges4() rect->setState("reanchored"); QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); - 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); + QCOMPARE(aChanges->object()->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item); + QCOMPARE(aChanges->object()->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine); + QCOMPARE(aChanges->object()->anchors()->verticalCenter().item, leftGuideline->verticalCenter().item); + QCOMPARE(aChanges->object()->anchors()->verticalCenter().anchorLine, leftGuideline->verticalCenter().anchorLine); delete rect; } @@ -710,10 +709,10 @@ void tst_qdeclarativestates::anchorChanges5() rect->setState("reanchored"); QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(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); - QCOMPARE(aChanges->anchors()->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; } |