summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeviewer
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-06-11 04:15:30 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-06-11 04:15:30 (GMT)
commit5e99815f85c953760d027be50caea5a386b6b710 (patch)
treeb8343e540b08ac0d1729d74e346abfdd38d4939e /tests/auto/declarative/qdeclarativeviewer
parent6f420a858afabf906977072f5efc67cdfc831d99 (diff)
downloadQt-5e99815f85c953760d027be50caea5a386b6b710.zip
Qt-5e99815f85c953760d027be50caea5a386b6b710.tar.gz
Qt-5e99815f85c953760d027be50caea5a386b6b710.tar.bz2
Fix test - sizeHint should not change after initial load. Also use
QTRY_COMPARE for some tests.
Diffstat (limited to 'tests/auto/declarative/qdeclarativeviewer')
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
index c249414..f30f758 100644
--- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
+++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
@@ -93,7 +93,7 @@ void tst_QDeclarativeViewer::orientation()
QCOMPARE(rootItem->width(), 200.0);
QCOMPARE(rootItem->height(), 300.0);
- QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QTRY_COMPARE(viewer->view()->size(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -103,7 +103,7 @@ void tst_QDeclarativeViewer::orientation()
QCOMPARE(rootItem->width(), 300.0);
QCOMPARE(rootItem->height(), 200.0);
- QCOMPARE(viewer->view()->size(), QSize(300, 200));
+ QTRY_COMPARE(viewer->view()->size(), QSize(300, 200));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(300, 200));
QCOMPARE(viewer->size(), QSize(300, 200+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -113,7 +113,7 @@ void tst_QDeclarativeViewer::orientation()
QCOMPARE(rootItem->width(), 200.0);
QCOMPARE(rootItem->height(), 300.0);
- QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QTRY_COMPARE(viewer->view()->size(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -265,7 +265,6 @@ void tst_QDeclarativeViewer::resizing()
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(150, 200));
QCOMPARE(viewer->size(), QSize(150, 200+viewer->menuBar()->height()));
- QCOMPARE(viewer->size(), viewer->sizeHint());
// do not size root object to view
viewer->resize(QSize(180,250));
@@ -284,7 +283,6 @@ void tst_QDeclarativeViewer::resizing()
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350-viewer->menuBar()->height()));
QCOMPARE(viewer->size(), QSize(250, 350));
- QCOMPARE(viewer->size(), viewer->sizeHint());
// do not size view to root object
rootItem->setWidth(150);