diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-06-23 13:12:29 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-06-23 13:12:29 (GMT) |
commit | d9cd51f412cf84ec9cd929e5d35c995b8904b49d (patch) | |
tree | 96a346dca9eb703127bccea469aa5cd679e958ef /tests | |
parent | 0ba6a795f786dc19486551fed2344f394b144a08 (diff) | |
parent | 5138c39116a03e36005a03f47f718fced6cc6d4e (diff) | |
download | Qt-d9cd51f412cf84ec9cd929e5d35c995b8904b49d.zip Qt-d9cd51f412cf84ec9cd929e5d35c995b8904b49d.tar.gz Qt-d9cd51f412cf84ec9cd929e5d35c995b8904b49d.tar.bz2 |
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt
Conflicts:
src/3rdparty/webkit/VERSION
src/3rdparty/webkit/WebCore/ChangeLog
src/3rdparty/webkit/WebKit/qt/ChangeLog
tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 11 | ||||
-rw-r--r-- | tests/auto/qrect/tst_qrect.cpp | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 981efeb..7552f18 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -173,6 +173,7 @@ private slots: void sceneBoundingRect(); void childrenBoundingRect(); void childrenBoundingRectTransformed(); + void childrenBoundingRect2(); void group(); void setGroup(); void nestedGroups(); @@ -2995,6 +2996,16 @@ void tst_QGraphicsItem::childrenBoundingRectTransformed() QCOMPARE(rect->childrenBoundingRect(), QRectF(-100, 75, 275, 250)); } +void tst_QGraphicsItem::childrenBoundingRect2() +{ + QGraphicsItemGroup box; + QGraphicsLineItem l1(0, 0, 100, 0, &box); + QGraphicsLineItem l2(100, 0, 100, 100, &box); + QGraphicsLineItem l3(0, 0, 0, 100, &box); + // Make sure lines (zero with/height) are included in the childrenBoundingRect. + QCOMPARE(box.childrenBoundingRect(), QRectF(0, 0, 100, 100)); +} + void tst_QGraphicsItem::group() { QGraphicsScene scene; diff --git a/tests/auto/qrect/tst_qrect.cpp b/tests/auto/qrect/tst_qrect.cpp index cdb5560..5a91636 100644 --- a/tests/auto/qrect/tst_qrect.cpp +++ b/tests/auto/qrect/tst_qrect.cpp @@ -4125,6 +4125,7 @@ void tst_QRect::unitedRect_data() QTest::newRow("test 13") << QRect() << QRect(10, 10, 10, 10) << QRect(10, 10, 10, 10); QTest::newRow("test 14") << QRect(10, 10, 10, 10) << QRect() << QRect(10, 10, 10, 10); QTest::newRow("test 15") << QRect() << QRect() << QRect(); + QTest::newRow("test 16") << QRect(0, 0, 100, 0) << QRect(0, 0, 0, 100) << QRect(0, 0, 100, 100); } void tst_QRect::unitedRect() @@ -4160,6 +4161,7 @@ void tst_QRect::unitedRectF_data() QTest::newRow("test 13") << QRectF() << QRectF(10, 10, 10, 10) << QRectF(10, 10, 10, 10); QTest::newRow("test 14") << QRectF(10, 10, 10, 10) << QRectF() << QRectF(10, 10, 10, 10); QTest::newRow("test 15") << QRectF() << QRectF() << QRectF(); + QTest::newRow("test 16") << QRectF(0, 0, 100, 0) << QRectF(0, 0, 0, 100) << QRectF(0, 0, 100, 100); } void tst_QRect::unitedRectF() |