diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-24 13:06:08 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-24 13:06:08 (GMT) |
commit | a6023cc80d3d10b186717d5e896a0bf4e2e6251a (patch) | |
tree | 692529f7a5e249e741937705a14b5ba025c8fba5 | |
parent | c6137472df3ef7799d41cee1af2f8efa86e702cf (diff) | |
parent | 14e7c8bf3982d05f6fc5c744ebbad791db6ab191 (diff) | |
download | Qt-a6023cc80d3d10b186717d5e896a0bf4e2e6251a.zip Qt-a6023cc80d3d10b186717d5e896a0bf4e2e6251a.tar.gz Qt-a6023cc80d3d10b186717d5e896a0bf4e2e6251a.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fix loop count in animanted gifs sometimes being incorrect
-rw-r--r-- | src/gui/image/qgifhandler.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp index 4dd4743..7cb7373 100644 --- a/src/gui/image/qgifhandler.cpp +++ b/src/gui/image/qgifhandler.cpp @@ -1046,7 +1046,7 @@ QGifHandler::QGifHandler() { gifFormat = new QGIFFormat; nextDelay = 100; - loopCnt = 1; + loopCnt = -1; frameNumber = -1; scanIsCached = false; } @@ -1192,7 +1192,13 @@ int QGifHandler::loopCount() const QGIFFormat::scan(device(), &imageSizes, &loopCnt); scanIsCached = true; } - return loopCnt-1; // In GIF, loop count is iteration count, so subtract one + + if (loopCnt == 0) + return -1; + else if (loopCnt == -1) + return 0; + else + return loopCnt; } int QGifHandler::currentImageNumber() const |