summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-06-23 15:12:29 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2009-06-23 15:12:29 +0200
commitd9cd51f412cf84ec9cd929e5d35c995b8904b49d (patch)
tree96a346dca9eb703127bccea469aa5cd679e958ef /tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
parent0ba6a795f786dc19486551fed2344f394b144a08 (diff)
parent5138c39116a03e36005a03f47f718fced6cc6d4e (diff)
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/auto/qgraphicsitem/tst_qgraphicsitem.cpp')
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 981efeb0d1..7552f18b46 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;