From a4b69e877850dc4b934f690e3451e586daffb049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 16 Sep 2010 16:30:07 +0200 Subject: Added support for turning off text drawing. Text drawing is the one thing that will always differ between different platforms. If we're going to do any x-platform testing of the raster engine we'll have to turn text drawing off.. --- tests/arthur/common/paintcommands.cpp | 2 ++ tests/arthur/common/paintcommands.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp index 1d7b810..a86b30a 100644 --- a/tests/arthur/common/paintcommands.cpp +++ b/tests/arthur/common/paintcommands.cpp @@ -1378,6 +1378,8 @@ void PaintCommands::command_qt3_drawArc(QRegExp re) /***************************************************************************************************/ void PaintCommands::command_drawText(QRegExp re) { + if (!m_shouldDrawText) + return; QStringList caps = re.capturedTexts(); int x = convertToInt(caps.at(1)); int y = convertToInt(caps.at(2)); diff --git a/tests/arthur/common/paintcommands.h b/tests/arthur/common/paintcommands.h index 4d966b8..ebd882b 100644 --- a/tests/arthur/common/paintcommands.h +++ b/tests/arthur/common/paintcommands.h @@ -90,6 +90,7 @@ public: , m_verboseMode(false) , m_type(WidgetType) , m_checkers_background(true) + , m_shouldDrawText(true) { staticInit(); } public: @@ -115,6 +116,7 @@ public: void setControlPoints(const QVector &points) { staticInit(); m_controlPoints = points; } void setVerboseMode(bool v) { staticInit(); m_verboseMode = v; } void insertAt(int commandIndex, const QStringList &newCommands); + void setShouldDrawText(bool drawText) { m_shouldDrawText = drawText; } // run void runCommands(); @@ -280,6 +282,7 @@ private: bool m_verboseMode; DeviceType m_type; bool m_checkers_background; + bool m_shouldDrawText; QVector m_controlPoints; -- cgit v0.12