--- a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp Tue Jul 06 15:10:48 2010 +0300
+++ b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp Wed Aug 18 10:37:55 2010 +0300
@@ -161,6 +161,7 @@
void draw();
void update();
void boundingRect();
+ void clippedBoundingRect();
void deviceRect();
void pixmap();
@@ -282,6 +283,20 @@
QTRY_COMPARE(effect->source()->boundingRect(), itemBoundingRect);
}
+void tst_QGraphicsEffectSource::clippedBoundingRect()
+{
+ QRectF itemBoundingRect = item->boundingRect();
+ item->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
+
+ QGraphicsRectItem *child = new QGraphicsRectItem(-1000, -1000, 2000, 2000);
+ child->setBrush(Qt::red);
+ child->setParentItem(item);
+
+ effect->storeDeviceDependentStuff = true;
+ effect->source()->update();
+ QTRY_COMPARE(effect->source()->boundingRect(Qt::LogicalCoordinates), itemBoundingRect);
+}
+
void tst_QGraphicsEffectSource::deviceRect()
{
effect->storeDeviceDependentStuff = true;