summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2011-05-20 10:30:35 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2011-05-20 10:49:09 (GMT)
commiteedab65056a6898e5a6f6bd103bed53e6787d334 (patch)
tree2a2954f94a0e041da2fcec0d8083447e5c2989b4 /tests
parent31e9c098f3c9321eebf1ac3e4c44a2d18d3816b8 (diff)
downloadQt-eedab65056a6898e5a6f6bd103bed53e6787d334.zip
Qt-eedab65056a6898e5a6f6bd103bed53e6787d334.tar.gz
Qt-eedab65056a6898e5a6f6bd103bed53e6787d334.tar.bz2
Fixed inconsistent behaviour in Qt.rect().
The QML function Qt.rect() used to return a null rectangle if the width or height argument were negative. This was inconsistent with Qt.size() and parsing a string of the type "x,y,wxh" which do not check the width and height. Reviewed-by: Samuel
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 80d9d93..518be89 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -174,7 +174,7 @@ void tst_qdeclarativeqt::rect()
QCOMPARE(qvariant_cast<QRectF>(object->property("test2")), QRectF(-10, 13, 100, 109.6));
QCOMPARE(qvariant_cast<QRectF>(object->property("test3")), QRectF());
QCOMPARE(qvariant_cast<QRectF>(object->property("test4")), QRectF());
- QCOMPARE(qvariant_cast<QRectF>(object->property("test5")), QRectF());
+ QCOMPARE(qvariant_cast<QRectF>(object->property("test5")), QRectF(10, 13, 100, -109));
delete object;
}