summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-15 21:05:15 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-15 21:05:15 +0100
commit4ef60892ce9e8dea75a31b0be7895ebf473346a9 (patch)
tree7778fdfb3460d24db63a5f15b28b138507eb1af0 /src/plugins
parentb50d20b7057fcd808525921e56d25f75140c79cd (diff)
parenta9ac71a443260de66f720f0184646847b03fcb46 (diff)
downloadqtsvg-4ef60892ce9e8dea75a31b0be7895ebf473346a9.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1
Conflicts: .qmake.conf Change-Id: Ia508d1e3f74dd35ac28b104c0cbdacdb6fe16d6b
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/imageformats/svg/qsvgiohandler.cpp b/src/plugins/imageformats/svg/qsvgiohandler.cpp
index c6d1c11..bb68fd9 100644
--- a/src/plugins/imageformats/svg/qsvgiohandler.cpp
+++ b/src/plugins/imageformats/svg/qsvgiohandler.cpp
@@ -128,7 +128,7 @@ bool QSvgIOHandler::canRead() const
if (buf.startsWith("\x1f\x8b")) {
setFormat("svgz");
return true;
- } else if (buf.contains("<?xml") || buf.contains("<svg")) {
+ } else if (buf.contains("<?xml") || buf.contains("<svg") || buf.contains("<!--")) {
setFormat("svg");
return true;
}
@@ -257,7 +257,7 @@ bool QSvgIOHandler::supportsOption(ImageOption option) const
bool QSvgIOHandler::canRead(QIODevice *device)
{
QByteArray buf = device->peek(8);
- return buf.startsWith("\x1f\x8b") || buf.contains("<?xml") || buf.contains("<svg");
+ return buf.startsWith("\x1f\x8b") || buf.contains("<?xml") || buf.contains("<svg") || buf.contains("<!--");
}
QT_END_NAMESPACE