diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qpixmap/tst_qpixmap.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp index d22cc86..9fb5f41 100644 --- a/tests/auto/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/qpixmap/tst_qpixmap.cpp @@ -199,6 +199,8 @@ private slots: void drawPixmapWhilePainterOpen(); void scaled_QTBUG19157(); + + void copyOnNonAlignedBoundary(); }; static bool lenientCompare(const QPixmap &actual, const QPixmap &expected) @@ -1966,5 +1968,13 @@ void tst_QPixmap::scaled_QTBUG19157() QVERIFY(!foo.isNull()); } +void tst_QPixmap::copyOnNonAlignedBoundary() +{ + QImage img(8, 2, QImage::Format_RGB16); + + QPixmap pm1 = QPixmap::fromImage(img, Qt::NoFormatConversion); + QPixmap pm2 = pm1.copy(QRect(5, 0, 3, 2)); // When copying second line: 2 bytes too many are read which might cause an access violation. +} + QTEST_MAIN(tst_QPixmap) #include "tst_qpixmap.moc" |