summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpainter
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-29 23:50:30 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-29 23:50:30 (GMT)
commitab870ab08b71c20b5dc13946bb8af5a51fb8182d (patch)
tree759002be5bf3049ac793d5a1462747a8270e68a4 /tests/auto/qpainter
parent587b0fed9bd17a378eb0212c95074df965549ef2 (diff)
parent33f01c58fa7e8f1d85f8cb591502f30a6ff30dd3 (diff)
downloadQt-ab870ab08b71c20b5dc13946bb8af5a51fb8182d.zip
Qt-ab870ab08b71c20b5dc13946bb8af5a51fb8182d.tar.gz
Qt-ab870ab08b71c20b5dc13946bb8af5a51fb8182d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (26 commits) Doc: QSettings::sync() imports changes made by other processes. Made -graphicssystem trace work with Qt::TextBypassShaping flag. Fix an assertion in comp_func_SourceOver_sse2() if const_alpha == 0 Add a manual test for regular widget interaction with the table. New variant of ::createPixmapData with origin for QGraphicsSystem. EGL plane levels are the same as all other GL backends. Need to access extensionFuncs in subclasses too. Export QGLWindowSurface too. Export the QGLPixmapData so that we can override it in a custom graphics system. Fixed autotest failure in QPathClipper on N900. Fixed autotest failure in QPainter::setOpacity when NEON is used. Fix compilation when configured with -no-xrender Add a new (internal) flag QGraphicsItem::ItemStopsClickFocusPropagation. Fixed some potential index-out-of-bounds issues in QImage. Fixed autotest failure in fillRect_stretchToDeviceMode Adding a known issue for VC2010 64 bit Added a note to desupport VC2010 64-bit Normalize integers when calling glVertexAttribPointer() Add an implementation of comp_func_solid_SourceOver_neon() with Neon. Fix the casts of qdrawhelper_sse2 ...
Diffstat (limited to 'tests/auto/qpainter')
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 701dc2e..27ee6e7 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -2648,12 +2648,16 @@ void tst_QPainter::setOpacity()
p.drawImage(imageRect, src, imageRect);
p.end();
- QImage expected(imageSize, destFormat);
- p.begin(&expected);
- p.fillRect(imageRect, QColor(127, 127, 127));
- p.end();
-
- QCOMPARE(dest, expected);
+ QImage actual = dest.convertToFormat(QImage::Format_RGB32);
+
+ for (int y = 0; y < actual.height(); ++y) {
+ QRgb *p = (QRgb *)actual.scanLine(y);
+ for (int x = 0; x < actual.width(); ++x) {
+ QVERIFY(qAbs(qRed(p[x]) - 127) <= 0xf);
+ QVERIFY(qAbs(qGreen(p[x]) - 127) <= 0xf);
+ QVERIFY(qAbs(qBlue(p[x]) - 127) <= 0xf);
+ }
+ }
}
void tst_QPainter::drawhelper_blend_untransformed_data()