diff -r 5dc02b23752f -r 3e2da88830cd src/gui/image/qxpmhandler.cpp --- a/src/gui/image/qxpmhandler.cpp Tue Jul 06 15:10:48 2010 +0300 +++ b/src/gui/image/qxpmhandler.cpp Wed Aug 18 10:37:55 2010 +0300 @@ -1225,11 +1225,15 @@ bool QXpmHandler::canRead() const { - if (state == Ready && canRead(device())) { + if (state == Ready && !canRead(device())) + return false; + + if (state != Error) { setFormat("xpm"); return true; } - return state != Error; + + return false; } bool QXpmHandler::canRead(QIODevice *device)