summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsscene
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2010-02-19 16:32:15 +0100
committerSamuel Rødal <sroedal@trolltech.com>2010-02-19 16:51:45 +0100
commitc5a89b5b11ba72d6078e625cc4c4111b76bd3251 (patch)
tree282e58aed1775939a13729eb3bcc7f50e3697eaa /tests/auto/qgraphicsscene
parentaaeb5a1f1e4d9ef6b24c3641ce1a0f9ba630b6d5 (diff)
Fixed QGraphicsScene autotest failure in task250680_childClip.
The path comparison is too strict. Even though the paths are equivalent (represent the same area) the comparison fails as they don't have the same representation. If we simplify the clip path and use the more generic path comparison approach from the QPathClipper autotest the test passes. Reviewed-by: Olivier Goffart
Diffstat (limited to 'tests/auto/qgraphicsscene')
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 469ded0ff7..2ef0419473 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -50,6 +50,7 @@
#include <private/qgraphicssceneindex_p.h>
#include <math.h>
#include "../../shared/util.h"
+#include "../qpathclipper/pathcompare.h"
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
#include <windows.h>
@@ -3560,7 +3561,7 @@ void tst_QGraphicsScene::task250680_childClip()
QPainterPath path;
path.addRect(-25, -25, 50, 50);
- QCOMPARE(rect->clipPath(), path);
+ QVERIFY(QPathCompare::comparePaths(rect->clipPath().simplified(), path));
QCOMPARE(scene.items(QRectF(320, 240, 5, 5)).size(), 2);
rect->rotate(45);