diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-11-10 12:23:52 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-11-12 14:22:08 (GMT) |
commit | c3b06980e96a809709c08e5b8ca98c6d7acbc9e5 (patch) | |
tree | b4d94f65e621df4aff2fc282a5e9e524f35bced3 /src | |
parent | fbf5e7b103626bb07fbb43449eaf014bdd299939 (diff) | |
download | Qt-c3b06980e96a809709c08e5b8ca98c6d7acbc9e5.zip Qt-c3b06980e96a809709c08e5b8ca98c6d7acbc9e5.tar.gz Qt-c3b06980e96a809709c08e5b8ca98c6d7acbc9e5.tar.bz2 |
Make the render() test pass when pixmaps aren't 32 bit.
Reviewed-by: Simon Hausmann
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp index 117393a..bbb676b 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp @@ -971,7 +971,10 @@ void tst_QWebElement::render() QImage testImage(resource.width(), resource.height(), QImage::Format_ARGB32); QPainter painter0(&testImage); painter0.fillRect(imageRect, Qt::white); - painter0.drawImage(0, 0, resource); + //render() uses pixmaps internally, and pixmaps might have bit depths + // other than 32, giving different pixel values due to rounding. + QPixmap pix = QPixmap::fromImage(resource); + painter0.drawPixmap(0, 0, pix); painter0.end(); QImage image1(resource.width(), resource.height(), QImage::Format_ARGB32); |