summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-11-03 07:26:59 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-11-03 07:30:17 (GMT)
commit658bac8782bde1404d4713e5b5e60e3f519457fa (patch)
tree5655a148070fd4aa1fb4728b404d31f72f9e02be /tests
parent7925f107814e46deb0848d9e6016721ceebfb521 (diff)
downloadQt-658bac8782bde1404d4713e5b5e60e3f519457fa.zip
Qt-658bac8782bde1404d4713e5b5e60e3f519457fa.tar.gz
Qt-658bac8782bde1404d4713e5b5e60e3f519457fa.tar.bz2
Revert "Correction for effectiveBoundingRect() calculation for QGraphicsItem"
This reverts commit 7925f107814e46deb0848d9e6016721ceebfb521. Needed to fix regressed auto-test tst_qgraphicsview::update_ancestorClipsChildrenToShape2.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index 3d45a07..9c189cb 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -68,7 +68,6 @@ private slots:
void boundingRectFor();
void boundingRect();
void boundingRect2();
- void boundingRect3();
void draw();
void opacity();
void grayscale();
@@ -320,39 +319,6 @@ void tst_QGraphicsEffect::boundingRect2()
QCOMPARE(effect->boundingRect(), effect->boundingRectFor(childRect | grandChildRect));
}
-void tst_QGraphicsEffect::boundingRect3()
-{
- QGraphicsScene scene;
- QGraphicsRectItem *root = new QGraphicsRectItem;
- scene.addItem(root);
- QRectF rootRect(0, 0, 100, 100);
- root->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
- root->setRect(rootRect);
-
- QGraphicsRectItem *child = new QGraphicsRectItem;
- child->setPos(5,5);
- child->setParentItem(root);
- CustomEffect *effect1 = new CustomEffect;
- child->setGraphicsEffect(effect1);
-
- QGraphicsRectItem *grandChild = new QGraphicsRectItem;
- QRectF grandChildRect(0, 0, 50, 50);
- grandChild->setRect(grandChildRect);
- grandChild->setPos(10,10);
- grandChild->setParentItem(child);
- CustomEffect *effect2 = new CustomEffect;
- grandChild->setGraphicsEffect(effect2);
-
- QRectF effectiveBoundingRectGrandChild = effect2->boundingRectFor(grandChildRect);
- QCOMPARE(effect2->boundingRect(), effectiveBoundingRectGrandChild);
-
- QRectF effectiveBoundingRectChildAndGrandChild = effect1->boundingRectFor(child->mapRectFromItem(grandChild, effectiveBoundingRectGrandChild));
- QCOMPARE(effect1->boundingRect(),effectiveBoundingRectChildAndGrandChild);
-
- // The children bounding rect of the root should be the rectangle of the grandChild enlarged twice by the CustomEffect on the grandChild and the child, but clipped by the root item
- QCOMPARE(root->childrenBoundingRect(), root->boundingRect().intersected(root->mapRectFromItem(child, effectiveBoundingRectChildAndGrandChild)));
-}
-
void tst_QGraphicsEffect::draw()
{
QGraphicsScene scene;