summaryrefslogtreecommitdiffstats
path: root/tests/arthur
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2010-09-03 12:59:19 (GMT)
committeraavit <qt-info@nokia.com>2010-09-03 12:59:19 (GMT)
commit01bc165834ed9dbe7e9c97a7ae988509d86a9312 (patch)
treeab3ae89f8d224992e9f20b2018af4128953bd848 /tests/arthur
parent5322e029863f0085c5cd58f8241d34be22231d27 (diff)
parent22293fb1c19e7ff7c8f3bec8c97729fb2816c96d (diff)
downloadQt-01bc165834ed9dbe7e9c97a7ae988509d86a9312.zip
Qt-01bc165834ed9dbe7e9c97a7ae988509d86a9312.tar.gz
Qt-01bc165834ed9dbe7e9c97a7ae988509d86a9312.tar.bz2
Merge branch 'lancelot' of scm.dev.nokia.troll.no:qt/aavits-graphicsstuff into lancelot
Diffstat (limited to 'tests/arthur')
-rw-r--r--tests/arthur/baselineserver/src/baselineserver.cpp17
-rw-r--r--tests/arthur/common/baselineprotocol.cpp15
-rw-r--r--tests/arthur/common/baselineprotocol.h1
3 files changed, 17 insertions, 16 deletions
diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp
index 430d4af..ec5793f 100644
--- a/tests/arthur/baselineserver/src/baselineserver.cpp
+++ b/tests/arthur/baselineserver/src/baselineserver.cpp
@@ -196,7 +196,7 @@ QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline)
+ plat.qtVersion + QDir::separator();
if (isBaseline) {
storePath += QLatin1String("baselines") + QDir::separator()
- + engineForItem(item) + QDir::separator();
+ + item.engineAsString() + QDir::separator();
} else {
storePath += runId + QDir::separator();
}
@@ -204,21 +204,6 @@ QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline)
return storePath + item.scriptName + QLatin1Char('.');
}
-QString BaselineHandler::engineForItem(const ImageItem &item)
-{
- switch (item.engine) {
- case ImageItem::Raster:
- return QLatin1String("Raster");
- break;
- case ImageItem::OpenGL:
- return QLatin1String("OpenGL");
- break;
- default:
- break;
- }
- return QLatin1String("Unknown");
-}
-
QString BaselineHandler::computeMismatchScore(const QImage &baseline, const QImage &rendered)
{
if (baseline.size() != rendered.size() || baseline.format() != rendered.format())
diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp
index f2b719f..7a423d2 100644
--- a/tests/arthur/common/baselineprotocol.cpp
+++ b/tests/arthur/common/baselineprotocol.cpp
@@ -72,6 +72,21 @@ quint64 ImageItem::computeChecksum(const QImage &image)
return (quint64(h1) << 32) | h2;
}
+QString ImageItem::engineAsString() const
+{
+ switch (engine) {
+ case Raster:
+ return QLatin1String("Raster");
+ break;
+ case OpenGL:
+ return QLatin1String("OpenGL");
+ break;
+ default:
+ break;
+ }
+ return QLatin1String("Unknown");
+}
+
QDataStream & operator<< (QDataStream &stream, const ImageItem &ii)
{
stream << ii.scriptName << ii.scriptChecksum << quint8(ii.status) << quint8(ii.renderFormat)
diff --git a/tests/arthur/common/baselineprotocol.h b/tests/arthur/common/baselineprotocol.h
index 749b623..9ec1ef4 100644
--- a/tests/arthur/common/baselineprotocol.h
+++ b/tests/arthur/common/baselineprotocol.h
@@ -31,6 +31,7 @@ public:
{}
ImageItem &operator=(const ImageItem &other);
static quint64 computeChecksum(const QImage& image);
+ QString engineAsString() const;
enum ItemStatus {
Ok = 0,