summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpainter
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:22:00 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:22:00 (GMT)
commitb7923d48fb6d755d4563eeed0e7f3cbc774d69d5 (patch)
treeec8bb06f58f714d0b799164693e93bf0d51b6bcf /tests/auto/qpainter
parente6dbbd0398d70ee64a3b8129e9621cfa15d70f8c (diff)
parenta62506aae40ede3fd8030312321759f669458909 (diff)
downloadQt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.zip
Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.gz
Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qpainter/tst_qpainter.cpp tests/auto/qtwidgets/tst_qtwidgets.cpp
Diffstat (limited to 'tests/auto/qpainter')
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 5d14d88..9515d87 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -236,6 +236,8 @@ private slots:
void clippingBug();
void emptyClip();
+ void taskQT4444_dontOverflowDashOffset();
+
private:
void fillData();
QColor baseColor( int k, int intensity=255 );
@@ -4287,5 +4289,28 @@ void tst_QPainter::drawImage_1x1()
QCOMPARE(img, expected);
}
+void tst_QPainter::taskQT4444_dontOverflowDashOffset()
+{
+ QPainter p;
+
+ QPen pen;
+ pen.setWidth(2);
+ pen.setStyle(Qt::DashDotLine);
+
+ QPointF point[4];
+ point[0] = QPointF(182.50868749707968,347.78457234212630);
+ point[1] = QPointF(182.50868749707968,107.22501998401277);
+ point[2] = QPointF(182.50868749707968,107.22501998401277);
+ point[3] = QPointF(520.46600762283651,107.22501998401277);
+
+ QImage crashImage(QSize(1000, 120), QImage::Format_ARGB32_Premultiplied);
+ p.begin(&crashImage);
+ p.setPen(pen);
+ p.drawLines(point, 2);
+ p.end();
+
+ QVERIFY(true); // Don't crash
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"