diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-23 11:50:01 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-23 11:50:01 (GMT) |
commit | 5a2f7b97d564e4b8a9619cd7aa1519b4dd084ae8 (patch) | |
tree | 7886477c9d38d8c07008e12abf2eb6e05ed672e3 /tests/auto/qpainter | |
parent | ca7be48b7a150952a9657d1000941fb986e5bb2b (diff) | |
parent | 33f0f832a243ee2cb188fcf27126bde6c6c883b0 (diff) | |
download | Qt-5a2f7b97d564e4b8a9619cd7aa1519b4dd084ae8.zip Qt-5a2f7b97d564e4b8a9619cd7aa1519b4dd084ae8.tar.gz Qt-5a2f7b97d564e4b8a9619cd7aa1519b4dd084ae8.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
src/gui/kernel/qcocoaview_mac.mm
src/s60installs/bwins/QtGuiu.def
src/s60installs/eabi/QtGuiu.def
src/testlib/qtestcase.cpp
Diffstat (limited to 'tests/auto/qpainter')
-rw-r--r-- | tests/auto/qpainter/tst_qpainter.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index ce1ff77..c21514b 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -262,6 +262,8 @@ private slots: void QTBUG14614_gradientCacheRaceCondition(); void drawTextOpacity(); + void QTBUG17053_zeroDashPattern(); + private: void fillData(); void setPenColor(QPainter& p); @@ -4684,6 +4686,26 @@ void tst_QPainter::drawTextOpacity() QCOMPARE(image, copy); } +void tst_QPainter::QTBUG17053_zeroDashPattern() +{ + QImage image(32, 32, QImage::Format_RGB32); + image.fill(0xffffffff); + + QImage original = image; + + QVector<qreal> pattern; + pattern << qreal(0) << qreal(0); + + QPainter p(&image); + QPen pen(Qt::black, 2.0); + pen.setDashPattern(pattern); + + p.setPen(pen); + p.drawLine(0, 0, image.width(), image.height()); + + QCOMPARE(image, original); +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" |