diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-09-07 13:55:27 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-09-07 13:59:47 (GMT) |
commit | a59566262ebd226a901172fc06c7bcb9023d5a33 (patch) | |
tree | 5bef597d469780f6fde314307bcd4ebcc89d11c5 /tests/arthur/baselineserver/src/baselineserver.cpp | |
parent | 5e3d55cc6fc3216e0079bb9d0c835338c9ac2ef8 (diff) | |
download | Qt-a59566262ebd226a901172fc06c7bcb9023d5a33.zip Qt-a59566262ebd226a901172fc06c7bcb9023d5a33.tar.gz Qt-a59566262ebd226a901172fc06c7bcb9023d5a33.tar.bz2 |
Make it possible to have several checksums associated with one ImageItem.
Also changed the meta file from being a text file to a binary file.
Nothing uses the extra checksums yet, but that should be added soon.
Diffstat (limited to 'tests/arthur/baselineserver/src/baselineserver.cpp')
-rw-r--r-- | tests/arthur/baselineserver/src/baselineserver.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 5328f59..5a96b90 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -136,16 +136,16 @@ void BaselineHandler::provideBaselineChecksums(const QByteArray &itemListBlock) i->status = ImageItem::IgnoreItem; continue; } - i->imageChecksum = 0; + i->imageChecksums.clear(); QString prefix = pathForItem(*i, true); QFile file(prefix + QLatin1String("metadata")); if (file.open(QIODevice::ReadOnly)) { - QTextStream ts(&file); - ts >> i->imageChecksum; + QDataStream checkSums(&file); + checkSums >> i->imageChecksums; file.close(); i->status = ImageItem::Ok; } - if (!i->imageChecksum) + if (!i->imageChecksums.count()) i->status = ImageItem::BaselineNotFound; } @@ -174,8 +174,8 @@ void BaselineHandler::storeImage(const QByteArray &itemBlock, bool isBaseline) //# Could use QSettings or XML or even DB, could use common file for whole dir or even whole storage - but for now, keep it simple QFile file(prefix + QLatin1String("metadata")); file.open(QIODevice::WriteOnly | QIODevice::Truncate); - QTextStream ts(&file); - ts << hex << showbase << item.imageChecksum << reset << endl; + QDataStream checkSums(&file); + checkSums << item.imageChecksums; file.close(); QByteArray msg(isBaseline ? "Baseline" : "Mismatching" ); |