src/gui/image/qxbmhandler.cpp
changeset 33 3e2da88830cd
parent 18 2f34d5167611
--- a/src/gui/image/qxbmhandler.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/gui/image/qxbmhandler.cpp	Wed Aug 18 10:37:55 2010 +0300
@@ -261,13 +261,15 @@
 
 bool QXbmHandler::canRead() const
 {
-    if (state == Ready) {
-        if (!canRead(device()))
-            return false;
+    if (state == Ready && !canRead(device()))
+        return false;
+
+    if (state != Error) {
         setFormat("xbm");
         return true;
     }
-    return state != Error;
+
+    return false;
 }
 
 bool QXbmHandler::canRead(QIODevice *device)