summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qimage/tst_qimage.cpp8
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp8
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index c5ded0d158..ad85bf5cce 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -151,6 +151,7 @@ private slots:
void rgbSwapped();
void deepCopyWhenPaintingActive();
+ void scaled_QTBUG19157();
};
tst_QImage::tst_QImage()
@@ -2029,5 +2030,12 @@ void tst_QImage::deepCopyWhenPaintingActive()
QVERIFY(copy != image);
}
+void tst_QImage::scaled_QTBUG19157()
+{
+ QImage foo(5000, 1, QImage::Format_RGB32);
+ foo = foo.scaled(1024, 1024, Qt::KeepAspectRatio);
+ QVERIFY(!foo.isNull());
+}
+
QTEST_MAIN(tst_QImage)
#include "tst_qimage.moc"
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 4ba51de7e5..1f1ee88b23 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -196,6 +196,7 @@ private slots:
#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
void vgImageReadBack();
#endif
+ void scaled_QTBUG19157();
};
static bool lenientCompare(const QPixmap &actual, const QPixmap &expected)
@@ -1897,5 +1898,12 @@ void tst_QPixmap::vgImageReadBack()
}
#endif // Symbian & OpenVG
+void tst_QPixmap::scaled_QTBUG19157()
+{
+ QPixmap foo(5000, 1);
+ foo = foo.scaled(1024, 1024, Qt::KeepAspectRatio);
+ QVERIFY(!foo.isNull());
+}
+
QTEST_MAIN(tst_QPixmap)
#include "tst_qpixmap.moc"