diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-26 05:18:54 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-26 05:18:54 (GMT) |
commit | f16d60399b996b09b779d2a719b5e6e6b9a80903 (patch) | |
tree | 6fdb5a62ad77a5b59b57b65f284acf909a549139 /tests/auto/declarative/qdeclarativeimage | |
parent | ca90afcf32d9ba083b34f5cef3c7bde6300844f4 (diff) | |
download | Qt-f16d60399b996b09b779d2a719b5e6e6b9a80903.zip Qt-f16d60399b996b09b779d2a719b5e6e6b9a80903.tar.gz Qt-f16d60399b996b09b779d2a719b5e6e6b9a80903.tar.bz2 |
sourceWidth/sourceHeight -> sourceSize
Diffstat (limited to 'tests/auto/declarative/qdeclarativeimage')
-rw-r--r-- | tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index c7dcbea..9073750 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -257,7 +257,7 @@ void tst_qdeclarativeimage::pixmap() void tst_qdeclarativeimage::svg() { - QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/heart.svg\"; sourceWidth: 300; sourceHeight: 300 }"; + QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/heart.svg\"; sourceSize.width: 300; sourceSize.height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create()); @@ -268,8 +268,7 @@ void tst_qdeclarativeimage::svg() QCOMPARE(obj->height(), 500.0); QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart.png")); - obj->setSourceWidth(200); - obj->setSourceHeight(200); + obj->setSourceSize(QSize(200,200)); QCOMPARE(obj->pixmap().width(), 200); QCOMPARE(obj->pixmap().height(), 200); @@ -282,7 +281,7 @@ void tst_qdeclarativeimage::svg() void tst_qdeclarativeimage::big() { - QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/big.jpeg\"; sourceWidth: 256; sourceHeight: 256 }"; + QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/big.jpeg\"; sourceSize.width: 256; sourceSize.height: 256 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create()); |