summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpainter
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-06-18 14:51:35 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-06-18 14:51:35 (GMT)
commit396eeb3f71c1c7edd861da1c8a8ec3086348502e (patch)
tree3ff6670ef4b192fd0993e0e9629e616570a6475a /tests/auto/qpainter
parente356eed2fa3d8e62085d6bd72caba9d11c40bacf (diff)
parent31ed96ef2c34429d61a5d9d1c1b7fe4fc17c708b (diff)
downloadQt-396eeb3f71c1c7edd861da1c8a8ec3086348502e.zip
Qt-396eeb3f71c1c7edd861da1c8a8ec3086348502e.tar.gz
Qt-396eeb3f71c1c7edd861da1c8a8ec3086348502e.tar.bz2
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt
Conflicts: configure.exe tests/auto/qpainter/tst_qpainter.cpp translations/qt_ru.ts
Diffstat (limited to 'tests/auto/qpainter')
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 3f36729..7e42da8 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -228,6 +228,7 @@ private slots:
void zeroOpacity();
void clippingBug();
+ void emptyClip();
private:
void fillData();
@@ -4218,5 +4219,23 @@ void tst_QPainter::clippingBug()
QCOMPARE(img, expected);
}
+void tst_QPainter::emptyClip()
+{
+ QImage img(64, 64, QImage::Format_ARGB32_Premultiplied);
+ QPainter p(&img);
+ p.setRenderHints(QPainter::Antialiasing);
+ p.setClipRect(0, 32, 64, 0);
+ p.fillRect(0, 0, 64, 64, Qt::white);
+
+ QPainterPath path;
+ path.lineTo(64, 0);
+ path.lineTo(64, 64);
+ path.lineTo(40, 64);
+ path.lineTo(40, 80);
+ path.lineTo(0, 80);
+
+ p.fillPath(path, Qt::green);
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"