Correct QStaticText tests after recent changes
authorJiang Jiang <jiang.jiang@nokia.com>
Fri, 3 Jun 2011 14:08:54 +0000 (16:08 +0200)
committerQt Continuous Integration System <qt-info@nokia.com>
Sat, 4 Jun 2011 10:20:00 +0000 (12:20 +0200)
Raster engine on Mac now correctly handles transformation, so no
need to XFAIL anymore. Also fixes a drawStaticText origin mistake,
the y origin should be the top left point rather than the baseline.

Change-Id: I6058e7099b336d9d5a6586344a07be3c7d76fb64
Reviewed-on: http://codereview.qt.nokia.com/329
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
tests/auto/qstatictext/tst_qstatictext.cpp

index 29845d9..e14c9db 100644 (file)
@@ -361,7 +361,7 @@ bool tst_QStaticText::supportsTransformations() const
     QPaintEngine::Type type = engine->type();
 
     if (type == QPaintEngine::OpenGL
-#if !defined(Q_WS_WIN) && !defined(Q_WS_X11)
+#if !defined(Q_WS_WIN) && !defined(Q_WS_X11) && !defined(Q_WS_MAC)
         || type == QPaintEngine::Raster
 #endif
         )
@@ -601,7 +601,7 @@ void tst_QStaticText::setPenPlainText()
 
         QStaticText staticText("XXXXX");
         staticText.setTextFormat(Qt::PlainText);
-        p.drawStaticText(0, fm.ascent(), staticText);
+        p.drawStaticText(0, 0, staticText);
     }
 
     QImage img = image.toImage();