summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-04 06:52:53 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-04 06:52:53 (GMT)
commitb83610a567c031f10d565a64edd4cb8b4d55a53a (patch)
tree1266fb797c14f71f3c1f3f5f3a227ca101ddec52 /tests
parentded5e7184b5078864928d670a3b89e0e8aa88dda (diff)
downloadQt-b83610a567c031f10d565a64edd4cb8b4d55a53a.zip
Qt-b83610a567c031f10d565a64edd4cb8b4d55a53a.tar.gz
Qt-b83610a567c031f10d565a64edd4cb8b4d55a53a.tar.bz2
Test SizeItemToLoader to SizeLoaderToItem resizeMode change.
Task-number: QT-2376
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp b/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
index 9d61f50..ffd46a9 100644
--- a/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
+++ b/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
@@ -274,6 +274,13 @@ void tst_QmlGraphicsLoader::sizeItemToLoader()
loader->setHeight(30);
QCOMPARE(rect->width(), 180.0);
QCOMPARE(rect->height(), 30.0);
+
+ // Switch mode
+ loader->setResizeMode(QmlGraphicsLoader::SizeLoaderToItem);
+ rect->setWidth(160);
+ rect->setHeight(45);
+ QCOMPARE(rect->width(), 160.0);
+ QCOMPARE(rect->height(), 45.0);
}
void tst_QmlGraphicsLoader::noResize()