summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-02-20 15:48:40 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-02-24 12:13:56 +0000
commit9e59174b49b8d4c6ebe0cab2b8df9e93f1090211 (patch)
treecbe694c84ce89efbd2170031642aa0cb28f0336c /tests
parentd8e65d5756c937fc3d9be3e5c30b31914a437393 (diff)
QPixmap: check data ptr in isQBitmap()
Task-number: QTBUG-51271 Change-Id: I670e074ced1217d2614fa334eb365e40ef80b8b1 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index 67d7e57fd4..4ffe357d09 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -105,6 +105,7 @@ private slots:
void drawBitmap();
void isNull();
void task_246446();
+ void task_51271();
void convertFromImageNoDetach();
void convertFromImageDetach();
@@ -1441,6 +1442,14 @@ void tst_QPixmap::task_246446()
QVERIFY(pm.mask().isNull());
}
+void tst_QPixmap::task_51271()
+{
+ QPixmap pm;
+ QBitmap bm;
+ QVERIFY(!pm.isQBitmap()); // Should not crash !
+ QVERIFY(bm.isQBitmap());
+}
+
void tst_QPixmap::preserveDepth()
{
QPixmap target(64, 64);