summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpainter
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-11-12 14:33:33 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-12 14:33:33 (GMT)
commit437e83e7707516129f68ee26aca5349845b7cc7b (patch)
tree0d4c8721f21acc5398e4eabff88a902cb23d0521 /tests/auto/qpainter
parent7b3880475d02bd3db630387bccccc7e1ef9d4e9a (diff)
parente61071a2a170eaeb524778e9e903100323b88bbe (diff)
downloadQt-437e83e7707516129f68ee26aca5349845b7cc7b.zip
Qt-437e83e7707516129f68ee26aca5349845b7cc7b.tar.gz
Qt-437e83e7707516129f68ee26aca5349845b7cc7b.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: configure doc/src/snippets/code/doc_src_qmake-manual.qdoc mkspecs/features/symbian/application_icon.prf mkspecs/features/symbian/default_post.prf mkspecs/features/symbian/symbian_building.prf qmake/generators/symbian/initprojectdeploy_symbian.cpp src/multimedia/audio/audio.pri src/network/access/qnetworkaccessmanager.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl_p.h src/plugins/bearer/corewlan/qcorewlanengine.mm src/plugins/phonon/mmf/mmf.pro tests/auto/qscriptvalue/tst_qscriptvalue.cpp tests/auto/qscriptvalue/tst_qscriptvalue.h tools/qdoc3/doc/qdoc-manual.qdocconf
Diffstat (limited to 'tests/auto/qpainter')
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 219f920..ab380a6 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -260,6 +260,7 @@ private slots:
void drawPointScaled();
void QTBUG14614_gradientCacheRaceCondition();
+ void drawTextOpacity();
private:
void fillData();
@@ -4659,6 +4660,30 @@ void tst_QPainter::QTBUG14614_gradientCacheRaceCondition()
producers[i].wait();
}
+void tst_QPainter::drawTextOpacity()
+{
+ QImage image(32, 32, QImage::Format_RGB32);
+ image.fill(0xffffffff);
+
+ QPainter p(&image);
+ p.setPen(QColor("#6F6F6F"));
+ p.setOpacity(0.5);
+ p.drawText(5, 30, QLatin1String("Qt"));
+ p.end();
+
+ QImage copy = image;
+ image.fill(0xffffffff);
+
+ p.begin(&image);
+ p.setPen(QColor("#6F6F6F"));
+ p.drawLine(-10, -10, -1, -1);
+ p.setOpacity(0.5);
+ p.drawText(5, 30, QLatin1String("Qt"));
+ p.end();
+
+ QCOMPARE(image, copy);
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"