summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp17
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp51
2 files changed, 0 insertions, 68 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 9c51e026d2..7d46ada820 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -1742,12 +1742,6 @@ public:
painter->fillRect(rect(), Qt::green);
painter->restore();
- painter->save();
- painter->setClipRect(0, 60, 60, 25, Qt::IntersectClip);
- painter->setClipRect(60, 60, 50, 25, Qt::UniteClip);
- painter->fillRect(rect(), Qt::yellow);
- painter->restore();
-
painter->restore();
painter->translate(100, 100);
@@ -1793,17 +1787,6 @@ public:
}
painter->fillRect(rect(), Qt::green);
painter->restore();
-
- painter->save();
- {
- QPainterPath path;
- path.addRect(0, 60, 60, 25);
- path.addRect(10, 10, 10, 10);
- painter->setClipPath(path, Qt::IntersectClip);
- }
- painter->setClipRect(60, 60, 50, 25, Qt::UniteClip);
- painter->fillRect(rect(), Qt::yellow);
- painter->restore();
}
protected:
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 5275778320..8898a4874d 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -1820,26 +1820,10 @@ int countPixels(const QImage &img, const QRgb &color)
template <typename T>
void testClipping(QImage &img)
{
- img.fill(0x0);
QPainterPath a, b;
a.addRect(QRect(2, 2, 4, 4));
b.addRect(QRect(4, 4, 4, 4));
-
QPainter p(&img);
- p.setClipPath(a);
- p.setClipPath(b, Qt::UniteClip);
-
- p.setClipping(false);
- p.setPen(Qt::NoPen);
- p.setBrush(QColor(0xff0000));
- p.drawRect(T(0, 0, 10, 10));
-
- p.setClipping(true);
- p.setBrush(QColor(0x00ff00));
- p.drawRect(T(0, 0, 10, 10));
-
- QCOMPARE(countPixels(img, 0xff0000), 72);
- QCOMPARE(countPixels(img, 0x00ff00), 28);
p.end();
img.fill(0x0);
@@ -2002,43 +1986,8 @@ void tst_QPainter::setEqualClipRegionAndPath()
QCOMPARE(img1, img2);
#endif
- // simple uniteclip
img1.fill(0x12345678);
img2.fill(0x12345678);
- {
- QPainter p(&img1);
- p.setClipRegion(region);
- p.setClipRegion(region, Qt::UniteClip);
- p.fillRect(0, 0, img1.width(), img1.height(), QColor(Qt::red));
- }
- {
- QPainter p(&img2);
- p.setClipPath(path);
- p.setClipPath(path, Qt::UniteClip);
- p.fillRect(0, 0, img2.width(), img2.height(), QColor(Qt::red));
- }
- QCOMPARE(img1, img2);
- img1.fill(0x12345678);
- img2.fill(0x12345678);
- {
- QPainter p(&img1);
- p.setClipPath(path);
- p.setClipRegion(region, Qt::UniteClip);
- p.fillRect(0, 0, img1.width(), img1.height(), QColor(Qt::red));
- }
- {
- QPainter p(&img2);
- p.setClipRegion(region);
- p.setClipPath(path, Qt::UniteClip);
- p.fillRect(0, 0, img2.width(), img2.height(), QColor(Qt::red));
- }
-#if 0
- if (img1 != img2) {
- img1.save("setEqualClipRegionAndPath_1.xpm", "XPM");
- img2.save("setEqualClipRegionAndPath_2.xpm", "XPM");
- }
-#endif
- QCOMPARE(img1, img2);
// simple intersectclip
img1.fill(0x12345678);