From 9e20aac8d44a0e3e3ac4c5d67376f50071987b91 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 25 Feb 2010 10:20:05 +0100 Subject: Better check in QStaticText testcase if xformed text is supported Reviewed-by: Eskil --- tests/auto/qstatictext/tst_qstatictext.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/auto/qstatictext/tst_qstatictext.cpp b/tests/auto/qstatictext/tst_qstatictext.cpp index b6b4e83..16832ad 100644 --- a/tests/auto/qstatictext/tst_qstatictext.cpp +++ b/tests/auto/qstatictext/tst_qstatictext.cpp @@ -45,6 +45,8 @@ #include #include +#include + #include #include @@ -297,14 +299,19 @@ void tst_QStaticText::translatedPainter() bool tst_QStaticText::supportsTransformations() const { + QPixmap pm(10, 10); + QPainter p(&pm); + QPaintEngine *engine = p.paintEngine(); - if (QApplicationPrivate::graphics_system_name == QLatin1String("opengl")) - return false; + QPaintEngine::Type type = engine->type(); -#if !defined(Q_WS_WIN) - if (QApplicationPrivate::graphics_system_name == "raster") - return false; + if (type == QPaintEngine::OpenGL2 + || type == QPaintEngine::OpenGL +#if !defined Q_WS_WIN + || type == QPaintEngine::Raster #endif + ) + return false; return true; } -- cgit v0.12