summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmap
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-05-12 12:45:32 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-05-12 12:45:32 (GMT)
commit1898c46452beae9e28cf9be7851099b4b4d2779e (patch)
tree00477e689bf1bd867fb3428476029b47817a9db8 /tests/auto/qpixmap
parentf15b8a83e2e51955776a3f07cb85ebfc342dd8ef (diff)
parent4d5a5149b716c67f031a3a40e23370f90542c92f (diff)
downloadQt-1898c46452beae9e28cf9be7851099b4b4d2779e.zip
Qt-1898c46452beae9e28cf9be7851099b4b4d2779e.tar.gz
Qt-1898c46452beae9e28cf9be7851099b4b4d2779e.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-statemachine
Conflicts: src/gui/graphicsview/qgraphicsitem.cpp
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 2b337da..ba117d8 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -103,6 +103,7 @@ private slots:
void grabWidget();
void grabWindow();
void isNull();
+ void task_246446();
#ifdef Q_WS_QWS
void convertFromImageNoDetach();
@@ -1015,5 +1016,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"