diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-11-23 07:01:36 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-11-23 07:01:36 (GMT) |
commit | 8bbbb67aa06077678a0bd865783efc1212a918c3 (patch) | |
tree | 303462a46289886a19e5b38a14eca78ce027637c /tests | |
parent | 4c72b0441380fd43b8ca63c9b7159adfb89c60e6 (diff) | |
download | Qt-8bbbb67aa06077678a0bd865783efc1212a918c3.zip Qt-8bbbb67aa06077678a0bd865783efc1212a918c3.tar.gz Qt-8bbbb67aa06077678a0bd865783efc1212a918c3.tar.bz2 |
Avoid warnings
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/anchors/data/anchors.qml | 13 | ||||
-rw-r--r-- | tests/auto/declarative/anchors/tst_anchors.cpp | 13 |
2 files changed, 6 insertions, 20 deletions
diff --git a/tests/auto/declarative/anchors/data/anchors.qml b/tests/auto/declarative/anchors/data/anchors.qml index e6bed48..b64d0b0 100644 --- a/tests/auto/declarative/anchors/data/anchors.qml +++ b/tests/auto/declarative/anchors/data/anchors.qml @@ -120,7 +120,7 @@ Rectangle { anchors.centerIn: masterRect } Rectangle { - id: rect23a; objectName: "rect23a" + id: rect23; objectName: "rect23" anchors.left: masterRect.left anchors.leftMargin: 5 anchors.right: masterRect.right @@ -131,17 +131,6 @@ Rectangle { anchors.bottomMargin: 5 } Rectangle { - id: rect23b; objectName: "rect23b" - anchors.left: rect23a.anchors.left - anchors.leftMargin: rect23a.anchors.leftMargin - anchors.right: rect23a.anchors.right - anchors.rightMargin: rect23a.anchors.rightMargin - anchors.top: rect23a.anchors.top - anchors.topMargin: rect23a.anchors.topMargin - anchors.bottom: rect23a.anchors.bottom - anchors.bottomMargin: rect23a.anchors.bottomMargin - } - Rectangle { id: rect24; objectName: "rect24" width: 10; height: 10 anchors.horizontalCenter: masterRect.left diff --git a/tests/auto/declarative/anchors/tst_anchors.cpp b/tests/auto/declarative/anchors/tst_anchors.cpp index d65d289..3011fdc 100644 --- a/tests/auto/declarative/anchors/tst_anchors.cpp +++ b/tests/auto/declarative/anchors/tst_anchors.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ #include <qtest.h> +#include <QSignalSpy> #include <QtDeclarative/qmlengine.h> #include <QtDeclarative/qmlcomponent.h> #include <QtDeclarative/qmlview.h> @@ -144,14 +145,10 @@ void tst_anchors::basicAnchors() QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect22"))->y(), 5.0); //margins - QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23a"))->x(), 31.0); - QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23a"))->y(), 5.0); - QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23a"))->width(), 86.0); - QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23a"))->height(), 10.0); - QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23b"))->x(), 31.0); - QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23b"))->y(), 5.0); - QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23b"))->width(), 86.0); - QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23b"))->height(), 10.0); + QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23"))->x(), 31.0); + QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23"))->y(), 5.0); + QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23"))->width(), 86.0); + QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect23"))->height(), 10.0); // offsets QCOMPARE(findItem<QmlGraphicsRectangle>(view->root(), QLatin1String("rect24"))->x(), 26.0); |