summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 8c72532122..2c0012497d 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -307,6 +307,8 @@ private slots:
void QTBUG50153_drawImage_assert();
+ void QTBUG56252();
+
private:
void fillData();
void setPenColor(QPainter& p);
@@ -5078,6 +5080,23 @@ void tst_QPainter::QTBUG50153_drawImage_assert()
}
}
+void tst_QPainter::QTBUG56252()
+{
+ QImage sourceImage(1770, 1477, QImage::Format_RGB32);
+ QImage rotatedImage(1478, 1771, QImage::Format_RGB32);
+ QTransform transformCenter;
+ transformCenter.translate(739.0, 885.5);
+ transformCenter.rotate(270.0);
+ transformCenter.translate(-885.0, -738.5);
+ QPainter painter;
+ painter.begin(&rotatedImage);
+ painter.setTransform(transformCenter);
+ painter.drawImage(QPoint(0, 0),sourceImage);
+ painter.end();
+
+ // If no crash or illegal memory read, all is fine
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"