diff options
Diffstat (limited to 'tests')
-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 4cf64f1..c9eca89 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -258,6 +258,8 @@ private slots: void QTBUG14614_gradientCacheRaceCondition(); void drawTextOpacity(); + void QTBUG17053_zeroDashPattern(); + private: void fillData(); void setPenColor(QPainter& p); @@ -4601,6 +4603,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" |