summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-06-09 01:51:29 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2010-06-09 03:13:50 (GMT)
commit5c6501970c7b6805b7edc30f90187700f05d9f15 (patch)
treecbc23e38845e2ae349e3fcae547818998b8b7f43 /tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
parent00b157dc4aad203e78b8e4d821470a1d01a195c0 (diff)
downloadQt-5c6501970c7b6805b7edc30f90187700f05d9f15.zip
Qt-5c6501970c7b6805b7edc30f90187700f05d9f15.tar.gz
Qt-5c6501970c7b6805b7edc30f90187700f05d9f15.tar.bz2
Fix drawing flicker on Qml Viewer startup
Task-number: QTBUG-10251 and QTBUG-11156 Reviewed-by: Martin Jones
Diffstat (limited to 'tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
index cc48bd0..6450e38 100644
--- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
+++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
@@ -80,6 +80,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QVERIFY(canvas);
QSignalSpy sceneResizedSpy(canvas, SIGNAL(sceneResized(QSize)));
canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ QCOMPARE(QSize(0,0), canvas->initialSize());
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodedeclarativeitem.qml"));
QDeclarativeItem* declarativeItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
QVERIFY(declarativeItem);
@@ -90,6 +91,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QCOMPARE(declarativeItem->height(), 200.0);
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy.count(), 1);
// size update from view
@@ -135,6 +137,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QCOMPARE(declarativeItem->width(), 200.0);
QCOMPARE(declarativeItem->height(), 200.0);
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy2.count(), 1);
// size update from root object
@@ -184,6 +187,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget()
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy.count(), 1);
// size update from view
@@ -223,6 +227,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget()
QCOMPARE(graphicsWidget->size(), QSizeF(200.0, 200.0));
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy2.count(), 1);
// size update from root object