--- a/src/gui/image/qppmhandler.cpp Tue Jul 06 15:10:48 2010 +0300
+++ b/src/gui/image/qppmhandler.cpp Wed Aug 18 10:37:55 2010 +0300
@@ -409,13 +409,15 @@
bool QPpmHandler::canRead() const
{
- if (state == Ready) {
- if (!canRead(device(), &subType))
- return false;
+ if (state == Ready && !canRead(device(), &subType))
+ return false;
+
+ if (state != Error) {
setFormat(subType);
return true;
}
- return state != Error;
+
+ return false;
}
bool QPpmHandler::canRead(QIODevice *device, QByteArray *subType)