diff options
Diffstat (limited to 'src/gui/image/qpnghandler.cpp')
-rw-r--r-- | src/gui/image/qpnghandler.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index dd31834..2cf8222 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -892,13 +892,15 @@ QPngHandler::~QPngHandler() bool QPngHandler::canRead() const { - if (d->state == QPngHandlerPrivate::Ready) { - if (!canRead(device())) - return false; + if (d->state == QPngHandlerPrivate::Ready && !canRead(device())) + return false; + + if (d->state != QPngHandlerPrivate::Error) { setFormat("png"); return true; } - return d->state != QPngHandlerPrivate::Error; + + return false; } bool QPngHandler::canRead(QIODevice *device) |