summaryrefslogtreecommitdiffstats
path: root/tests/auto/qimage
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-12-13 10:39:16 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-12-13 10:39:16 (GMT)
commitd369ae7b831744c796571aa86b5d6570b09e70e4 (patch)
tree0ad8abef937ac3009f32b600a8e3b5644d7c637c /tests/auto/qimage
parentc8a2533cb39ce0c7479880cd889ad594d569ecc0 (diff)
parent044708cb7f7fd1f2d7b18d20269422e7f3a1cb83 (diff)
downloadQt-d369ae7b831744c796571aa86b5d6570b09e70e4.zip
Qt-d369ae7b831744c796571aa86b5d6570b09e70e4.tar.gz
Qt-d369ae7b831744c796571aa86b5d6570b09e70e4.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: configure src/gui/graphicsview/qgraphicslayout.cpp src/gui/text/qfontengine_s60.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
Diffstat (limited to 'tests/auto/qimage')
-rw-r--r--tests/auto/qimage/tst_qimage.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index 6cce05cd1..489a81d 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -149,6 +149,8 @@ private slots:
void rgbSwapped_data();
void rgbSwapped();
+
+ void deepCopyWhenPaintingActive();
};
tst_QImage::tst_QImage()
@@ -2013,5 +2015,19 @@ void tst_QImage::rgbSwapped()
QCOMPARE(memcmp(image.constBits(), imageSwappedTwice.constBits(), image.numBytes()), 0);
}
+void tst_QImage::deepCopyWhenPaintingActive()
+{
+ QImage image(64, 64, QImage::Format_ARGB32_Premultiplied);
+ image.fill(0);
+
+ QPainter painter(&image);
+ QImage copy = image;
+
+ painter.setBrush(Qt::black);
+ painter.drawEllipse(image.rect());
+
+ QVERIFY(copy != image);
+}
+
QTEST_MAIN(tst_QImage)
#include "tst_qimage.moc"