diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-02-22 18:24:44 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-02-22 18:24:44 (GMT) |
commit | 3f960aa1cf396e5206a6c28e68097257625c1df9 (patch) | |
tree | 9cee4f1d03b4126deb35f40fb407d1ab00e06240 /tests | |
parent | 668499a22e7e5f166a001fe77dd709d24d0183ea (diff) | |
parent | 9d019830169289a3aa00e8baca9c320963904993 (diff) | |
download | Qt-3f960aa1cf396e5206a6c28e68097257625c1df9.zip Qt-3f960aa1cf396e5206a6c28e68097257625c1df9.tar.gz Qt-3f960aa1cf396e5206a6c28e68097257625c1df9.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Prevent infinite loop in raster engine on zero dash pattern length.
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" |