diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-26 16:22:13 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-26 16:22:13 (GMT) |
commit | 8533384ded9323a0b38490ed65793abd9a62d46f (patch) | |
tree | 6faac6d1c32bebb1df0294332033bc44dc0d8ae5 /src/gui/image | |
parent | 834c8617dc130126c0ce5213bda36b9f62717b1e (diff) | |
parent | 5498dcd7b10e147734a3414cab824b8b435aa3d9 (diff) | |
download | Qt-8533384ded9323a0b38490ed65793abd9a62d46f.zip Qt-8533384ded9323a0b38490ed65793abd9a62d46f.tar.gz Qt-8533384ded9323a0b38490ed65793abd9a62d46f.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Diffstat (limited to 'src/gui/image')
-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 |