summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmap
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-03-24 15:50:57 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-24 15:50:57 (GMT)
commit88fd79fc3a52ef6d3649579879a72a8badc3fb4b (patch)
tree6094abae88cab3efbe2a0eb02a63730e5e7e1686 /tests/auto/qpixmap
parentf5caf1998dea7dbad25dc6aed5a00fc33e8a5818 (diff)
parente18eac95ad4b69ebe53e51c65416f1c94275e10a (diff)
downloadQt-88fd79fc3a52ef6d3649579879a72a8badc3fb4b.zip
Qt-88fd79fc3a52ef6d3649579879a72a8badc3fb4b.tar.gz
Qt-88fd79fc3a52ef6d3649579879a72a8badc3fb4b.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests/auto/qpixmap')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 1590fc0..8a6b63b 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -106,6 +106,7 @@ private slots:
void grabWidget();
void grabWindow();
void isNull();
+ void task_246446();
#ifdef Q_WS_QWS
void convertFromImageNoDetach();
@@ -1111,5 +1112,20 @@ void tst_QPixmap::fromData()
QCOMPARE(img.pixel(0, 1), QRgb(0xff000000));
}
+void tst_QPixmap::task_246446()
+{
+ // This crashed without the bugfix in 246446
+ QPixmap pm(10, 10);
+ pm.fill(Qt::transparent); // force 32-bit depth
+ QBitmap bm;
+ pm.setMask(bm);
+ {
+ QPixmap pm2(pm);
+ }
+ QVERIFY(pm.width() == 10);
+ QVERIFY(pm.mask().isNull());
+}
+
+
QTEST_MAIN(tst_QPixmap)
#include "tst_qpixmap.moc"