summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
index 695c038..b08da0f 100644
--- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
+++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
@@ -113,7 +113,6 @@ void tst_QDeclarativeViewer::orientation()
viewer->rotateOrientation();
qApp->processEvents();
- qApp->processEvents(); // one extra round for the delayed updateSizeHints() call
QCOMPARE(rootItem->width(), 300.0);
QCOMPARE(rootItem->height(), 200.0);
@@ -124,7 +123,6 @@ void tst_QDeclarativeViewer::orientation()
viewer->rotateOrientation();
qApp->processEvents();
- qApp->processEvents(); // one extra round for the delayed updateSizeHints() call
QCOMPARE(rootItem->width(), 200.0);
QCOMPARE(rootItem->height(), 300.0);
@@ -159,10 +157,10 @@ void tst_QDeclarativeViewer::loading()
// window resized
QTRY_COMPARE(rootItem->width(), 400.0);
- QTRY_COMPARE(rootItem->height(), 500.0-viewer->menuBar()->height());
- QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height()));
+ QTRY_COMPARE(rootItem->height(), 500.0 - MENUBAR_HEIGHT(viewer));
+ QCOMPARE(viewer->view()->size(), QSize(400, 500 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
- QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->size(), QSize(400, 500));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -176,7 +174,7 @@ void tst_QDeclarativeViewer::loading()
QCOMPARE(viewer->view()->size(), QSize(200, 300));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
- QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), QSize(200, 300 + MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->size(), viewer->sizeHint());
viewer->resize(QSize(400, 500));
@@ -184,10 +182,10 @@ void tst_QDeclarativeViewer::loading()
// window resized again
QTRY_COMPARE(rootItem->width(), 400.0);
- QTRY_COMPARE(rootItem->height(), 500.0-viewer->menuBar()->height());
- QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height()));
+ QTRY_COMPARE(rootItem->height(), 500.0 - MENUBAR_HEIGHT(viewer));
+ QCOMPARE(viewer->view()->size(), QSize(400, 500 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
- QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->size(), QSize(400, 500));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -201,7 +199,7 @@ void tst_QDeclarativeViewer::loading()
QCOMPARE(viewer->view()->size(), QSize(200, 300));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
- QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), QSize(200, 300 + MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->size(), viewer->sizeHint());
delete viewer;
@@ -272,7 +270,7 @@ void tst_QDeclarativeViewer::resizing()
QTRY_COMPARE(viewer->view()->size(), QSize(150, 200));
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(), QSize(150, 200 + MENUBAR_HEIGHT(viewer)));
// do not size root object to view
viewer->resize(QSize(180,250));
@@ -286,10 +284,10 @@ void tst_QDeclarativeViewer::resizing()
qApp->processEvents();
QTRY_COMPARE(rootItem->width(), 250.0);
- QTRY_COMPARE(rootItem->height(), 350.0-viewer->menuBar()->height());
- QTRY_COMPARE(viewer->view()->size(), QSize(250, 350-viewer->menuBar()->height()));
+ QTRY_COMPARE(rootItem->height(), 350.0 - MENUBAR_HEIGHT(viewer));
+ QTRY_COMPARE(viewer->view()->size(), QSize(250, 350 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
- QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->size(), QSize(250, 350));
// do not size view to root object