summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstatictext
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-02-25 09:20:05 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-02-25 09:20:05 (GMT)
commit9e20aac8d44a0e3e3ac4c5d67376f50071987b91 (patch)
tree0dfa96087ca129f25d2e59265f73a046d75d274f /tests/auto/qstatictext
parent533bf9e4b7bda99c589f14fb308fa75231196703 (diff)
downloadQt-9e20aac8d44a0e3e3ac4c5d67376f50071987b91.zip
Qt-9e20aac8d44a0e3e3ac4c5d67376f50071987b91.tar.gz
Qt-9e20aac8d44a0e3e3ac4c5d67376f50071987b91.tar.bz2
Better check in QStaticText testcase if xformed text is supported
Reviewed-by: Eskil
Diffstat (limited to 'tests/auto/qstatictext')
-rw-r--r--tests/auto/qstatictext/tst_qstatictext.cpp17
1 files 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 <QtGui/QImage>
#include <qstatictext.h>
+#include <qpaintengine.h>
+
#include <private/qstatictext_p.h>
#include <private/qapplication_p.h>
@@ -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;
}