From 50a53d2f7a7e12cd597dc72a08ad62b79fee4554 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 17 Aug 2010 07:27:50 +0200 Subject: fix breakages in qpainter autotests. --- src/gui/painting/qpaintengine_raster.cpp | 5 ----- tests/auto/qpainter/tst_qpainter.cpp | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index fadf917..0b76898 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1505,8 +1505,6 @@ void QRasterPaintEngine::drawRects(const QRect *rects, int rectCount) Q_D(QRasterPaintEngine); QRasterPaintEngineState *s = state(); - printf("drawRects (I)\n"); - // Fill ensureBrush(); if (s->brushData.blend) { @@ -1516,9 +1514,6 @@ void QRasterPaintEngine::drawRects(const QRect *rects, int rectCount) int offset_x = int(s->matrix.dx()); int offset_y = int(s->matrix.dy()); - - printf("drawing rect: %d %d %d %d, offset=%d %d\n", - r->x(), r->y(), r->width(), r->height(), offset_x, offset_y); while (r < lastRect) { QRect rect = r->normalized(); QRect rr = rect.translated(offset_x, offset_y); diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index 9ed212f..11ff319 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -1300,7 +1300,7 @@ void tst_QPainter::drawRect2() p.end(); QRect stroke = getPaintedSize(image, Qt::white); - QCOMPARE(stroke.adjusted(1, 1, 0, 0), fill.adjusted(0, 0, 1, 1)); + QCOMPARE(stroke, fill.adjusted(0, 0, 1, 1)); } } @@ -1397,13 +1397,13 @@ void tst_QPainter::drawPath_data() { QPainterPath p; p.addRect(2.25, 2.25, 10, 10); - QTest::newRow("non-aligned rect") << p << QRect(3, 3, 10, 10) << 10 * 10; + QTest::newRow("non-aligned rect") << p << QRect(2, 2, 10, 10) << 10 * 10; } { QPainterPath p; p.addRect(2.25, 2.25, 10.5, 10.5); - QTest::newRow("non-aligned rect 2") << p << QRect(3, 3, 10, 10) << 10 * 10; + QTest::newRow("non-aligned rect 2") << p << QRect(2, 2, 11, 11) << 11 * 11; } { -- cgit v0.12