diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2010-02-19 15:32:15 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2010-02-19 15:51:45 (GMT) |
commit | c5a89b5b11ba72d6078e625cc4c4111b76bd3251 (patch) | |
tree | 282e58aed1775939a13729eb3bcc7f50e3697eaa /tests/auto/qgraphicsscene | |
parent | aaeb5a1f1e4d9ef6b24c3641ce1a0f9ba630b6d5 (diff) | |
download | Qt-c5a89b5b11ba72d6078e625cc4c4111b76bd3251.zip Qt-c5a89b5b11ba72d6078e625cc4c4111b76bd3251.tar.gz Qt-c5a89b5b11ba72d6078e625cc4c4111b76bd3251.tar.bz2 |
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.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 469ded0..2ef0419 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); |