summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorABBAPOH <ABBAPOH@nextmail.ru>2013-12-13 19:27:03 +0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-16 15:06:16 +0100
commit2c7b8941ae4e70787f56fc277b582c8c698716d3 (patch)
treee2b4edb2cea57c4b4563523acd730da63a8e9e5c /src
parent5aedb778707f2707d66eb848276e8c2f0b4d447c (diff)
downloadqtimageformats-2c7b8941ae4e70787f56fc277b582c8c698716d3.tar.gz
Fix QDDSHandler::canRead to return false in case of a scan error.
Change-Id: If776b122c90d79d430916677a46684770870956a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Alex Char <prevedtest@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/imageformats/dds/qddshandler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/imageformats/dds/qddshandler.cpp b/src/plugins/imageformats/dds/qddshandler.cpp
index 428659f..c85e75d 100644
--- a/src/plugins/imageformats/dds/qddshandler.cpp
+++ b/src/plugins/imageformats/dds/qddshandler.cpp
@@ -1238,10 +1238,14 @@ QByteArray QDDSHandler::name() const
bool QDDSHandler::canRead() const
{
- if (canRead(device())) {
+ if (m_scanState == ScanNotScanned && !canRead(device()))
+ return false;
+
+ if (m_scanState != ScanError) {
setFormat(QByteArrayLiteral("dds"));
return true;
}
+
return false;
}