summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-06-15 12:55:18 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-06-15 12:55:18 (GMT)
commit2cb5d8f7425bce83b5e95925e15d7920be3d2e8d (patch)
tree8b44fe4a9c0fc286e0017a6f34e669d53cb0299e /tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
parente9e93fe79d7451f05a714241f759c557a455de67 (diff)
parent11420641d9341af6615baa21453e08c092f7fb10 (diff)
downloadQt-2cb5d8f7425bce83b5e95925e15d7920be3d2e8d.zip
Qt-2cb5d8f7425bce83b5e95925e15d7920be3d2e8d.tar.gz
Qt-2cb5d8f7425bce83b5e95925e15d7920be3d2e8d.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
index b183105..6450e38 100644
--- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
+++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
@@ -47,6 +47,11 @@
#include <QtGui/qgraphicswidget.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeView : public QObject
{
@@ -75,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);
@@ -85,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
@@ -130,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
@@ -179,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
@@ -218,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