summaryrefslogtreecommitdiffstats
path: root/tests/arthur
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-06-08 15:38:15 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-06-08 15:38:15 (GMT)
commit457d178fae492c81276ded4be9f861375eecb23b (patch)
treea0e19fd57f9a7d5a4f1f5668f5bdda570f33c64f /tests/arthur
parentf6909d47b981720cb87cb96454cdf9ea493383ee (diff)
parent5fe85b9d0e133734c7789fa9d1565684e15c5e2f (diff)
downloadQt-457d178fae492c81276ded4be9f861375eecb23b.zip
Qt-457d178fae492c81276ded4be9f861375eecb23b.tar.gz
Qt-457d178fae492c81276ded4be9f861375eecb23b.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: (56 commits) Fix compile when configure with no fontconfig support Fix warning in qtextengine compilation Reorder member varibles in QGlyphRunPrivate to eliminate warning Revert 36e01e69 Fixed compile of tst_qscriptextensionplugin on some Windows configurations Add function QGlyphRun::setRawData() Correct antialias disabling logic for Core Text Correct QStaticText tests after recent changes Add missing license header. Add basic static text drawing capability to lance Fix Windows build Refactor glyph pretransform check Add the new 'glhypnotizer' demo. Fix problem with cosmetic stroking of cubic beziers Fix autotest to not depend on rasterization details Still use midpoint rendering of aliased ellipses Symbian build failure for Armv5 Fix the wayland windowsurface so that we have stencil and depth buffer We need to let the currentContext be in the same state after Track Wayland changes ...
Diffstat (limited to 'tests/arthur')
-rw-r--r--tests/arthur/common/paintcommands.cpp20
-rw-r--r--tests/arthur/common/paintcommands.h1
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp
index 184fbb9..298c699 100644
--- a/tests/arthur/common/paintcommands.cpp
+++ b/tests/arthur/common/paintcommands.cpp
@@ -48,6 +48,7 @@
#include <qtextstream.h>
#include <qtextlayout.h>
#include <qdebug.h>
+#include <QStaticText>
#ifdef QT3_SUPPORT
#include <q3painter.h>
@@ -464,6 +465,10 @@ void PaintCommands::staticInit()
"^drawText\\s+(-?\\w*)\\s+(-?\\w*)\\s+\"(.*)\"$",
"drawText <x> <y> <text>",
"drawText 10 10 \"my text\"");
+ DECL_PAINTCOMMAND("drawStaticText", command_drawStaticText,
+ "^drawStaticText\\s+(-?\\w*)\\s+(-?\\w*)\\s+\"(.*)\"$",
+ "drawStaticText <x> <y> <text>",
+ "drawStaticText 10 10 \"my text\"");
DECL_PAINTCOMMAND("drawTiledPixmap", command_drawTiledPixmap,
"^drawTiledPixmap\\s+([\\w.:\\/]*)"
"\\s+(-?\\w*)\\s+(-?\\w*)\\s*(-?\\w*)\\s*(-?\\w*)"
@@ -1404,6 +1409,21 @@ void PaintCommands::command_drawText(QRegExp re)
m_painter->drawText(x, y, txt);
}
+void PaintCommands::command_drawStaticText(QRegExp re)
+{
+ if (!m_shouldDrawText)
+ return;
+ QStringList caps = re.capturedTexts();
+ int x = convertToInt(caps.at(1));
+ int y = convertToInt(caps.at(2));
+ QString txt = caps.at(3);
+
+ if (m_verboseMode)
+ printf(" -(lance) drawStaticText(%d, %d, %s)\n", x, y, qPrintable(txt));
+
+ m_painter->drawStaticText(x, y, QStaticText(txt));
+}
+
/***************************************************************************************************/
void PaintCommands::command_noop(QRegExp)
{
diff --git a/tests/arthur/common/paintcommands.h b/tests/arthur/common/paintcommands.h
index 6cc0889..04492ea 100644
--- a/tests/arthur/common/paintcommands.h
+++ b/tests/arthur/common/paintcommands.h
@@ -209,6 +209,7 @@ private:
void command_drawRoundedRect(QRegExp re);
void command_drawRoundRect(QRegExp re);
void command_drawText(QRegExp re);
+ void command_drawStaticText(QRegExp re);
void command_drawTiledPixmap(QRegExp re);
void command_path_addEllipse(QRegExp re);
void command_path_addPolygon(QRegExp re);