From aa97c7b7a71ddaf3f01f312658b9a43428846aee Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Tue, 15 Jun 2010 10:00:46 +1000 Subject: Fixed unit test failure in qimagereader. This bug was introduced with bug fix 558089fb21e7f388f9810c51abbd9bf3872b2178 --- src/plugins/imageformats/gif/qgifhandler.cpp | 2 +- tests/auto/qimagereader/tst_qimagereader.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 56dac52..cba3ff6 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -1061,7 +1061,7 @@ bool QGifHandler::imageIsComing() const bool QGifHandler::canRead() const { - if (!nextDelay && canRead(device())) { + if (canRead(device())) { setFormat("gif"); return true; } diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 99244c2..fc2582f 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -1763,14 +1763,14 @@ void tst_QImageReader::testIgnoresFormatAndExtension() QFETCH(QString, expected); QList formats = QImageReader::supportedImageFormats(); - QString fileNameBase = "images/" + name + "."; + QString fileNameBase = prefix + name + "."; foreach (const QByteArray &f, formats) { if (f == extension) continue; QFile tmp(QDir::tempPath() + "/" + name + "_" + expected + "." + f); - QFile::copy(fileNameBase + extension, QFileInfo(tmp).absoluteFilePath()); + QVERIFY(QFile::copy(fileNameBase + extension, QFileInfo(tmp).absoluteFilePath())); QString format; QImage image; -- cgit v0.12