Revert "fix breakages in qpainter autotests."
authoraavit <qt-info@nokia.com>
Thu, 19 May 2011 10:48:35 +0000 (12:48 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 27 Jun 2011 08:59:28 +0000 (10:59 +0200)
This reverts commit 50a53d2f7a7e12cd597dc72a08ad62b79fee4554.
...which was required because of
69fc9e594e6d5da87bff42707973683f84b67c93
"Fix how subpixel positions are intepreted in an aliased grid."
which was reverted in f8e85838c5531b56c2175cbdb9c24db426f7fd89
because of 37c329a3e35fabc88fbcad824a69f37c671d2132
"New algorithm for drawing thin lines".

phew!
(cherry picked from commit 14bf7c3761efe208ce19047b8ddc3f811a63a437)

Change-Id: I16d672685efb1901927190c58ef1477c89d946c1
Reviewed-on: http://codereview.qt.nokia.com/604
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
tests/auto/qpainter/tst_qpainter.cpp

index a149e08..5275778 100644 (file)
@@ -1294,7 +1294,7 @@ void tst_QPainter::drawRect2()
         p.end();
 
         QRect stroke = getPaintedSize(image, Qt::white);
-        QCOMPARE(stroke, fill.adjusted(0, 0, 1, 1));
+        QCOMPARE(stroke.adjusted(1, 1, 0, 0), fill.adjusted(0, 0, 1, 1));
     }
 }
 
@@ -1391,13 +1391,13 @@ void tst_QPainter::drawPath_data()
     {
         QPainterPath p;
         p.addRect(2.25, 2.25, 10, 10);
-        QTest::newRow("non-aligned rect") << p << QRect(2, 2, 10, 10) << 10 * 10;
+        QTest::newRow("non-aligned rect") << p << QRect(3, 3, 10, 10) << 10 * 10;
     }
 
     {
         QPainterPath p;
         p.addRect(2.25, 2.25, 10.5, 10.5);
-        QTest::newRow("non-aligned rect 2") << p << QRect(2, 2, 11, 11) << 11 * 11;
+        QTest::newRow("non-aligned rect 2") << p << QRect(3, 3, 10, 10) << 10 * 10;
     }
 
     {