summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeborderimage
diff options
context:
space:
mode:
authorChristopher Ham <christopher.ham@nokia.com>2010-12-03 06:20:58 (GMT)
committerChristopher Ham <christopher.ham@nokia.com>2010-12-03 06:34:25 (GMT)
commitb02cf26c0c236679439826cb8093f6dd6d3b2fec (patch)
treebe166040a0ba410a25b41da6586a98cd35b0890d /tests/auto/declarative/qdeclarativeborderimage
parenta305814f8f59f634943d8d5f8d87d2fd49891cb3 (diff)
downloadQt-b02cf26c0c236679439826cb8093f6dd6d3b2fec.zip
Qt-b02cf26c0c236679439826cb8093f6dd6d3b2fec.tar.gz
Qt-b02cf26c0c236679439826cb8093f6dd6d3b2fec.tar.bz2
borderImage should not support setting sourceSize
SIGNAL sourceSizeChanged is properly called. Setting the sourceSize for borderImage in QML returns a warning. Auto tests were added to check that sourceSize remains consistent. Reviewed-by: Joona Petrell
Diffstat (limited to 'tests/auto/declarative/qdeclarativeborderimage')
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
index 2f00f60..5478145 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
+++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
@@ -153,6 +153,8 @@ void tst_qdeclarativeborderimage::imageSource()
QTRY_VERIFY(obj->status() == QDeclarativeBorderImage::Ready);
QCOMPARE(obj->width(), 120.);
QCOMPARE(obj->height(), 120.);
+ QCOMPARE(obj->sourceSize().width(), 120);
+ QCOMPARE(obj->sourceSize().height(), 120);
QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch);
QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch);
} else {
@@ -192,6 +194,8 @@ void tst_qdeclarativeborderimage::resized()
QVERIFY(obj != 0);
QCOMPARE(obj->width(), 300.);
QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->sourceSize().width(), 120);
+ QCOMPARE(obj->sourceSize().height(), 120);
QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch);
QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch);