summaryrefslogtreecommitdiff
path: root/src/svg
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-14 13:29:51 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-02-14 13:29:51 +0000
commit8171769a728b094e1996a3449ce2d63230c4704a (patch)
treed0a3daa54552204dfcfe54d0c5cf34dc55928100 /src/svg
parent8d3e38c9ccb52ff2c4d719401fb69e2b92affe1e (diff)
parent56cccc0b65c03b8e5df72a61d6bd402171edf5ba (diff)
downloadqtsvg-8171769a728b094e1996a3449ce2d63230c4704a.tar.gz
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/doc/qtsvg.qdocconf3
-rw-r--r--src/svg/qsvghandler.cpp10
2 files changed, 11 insertions, 2 deletions
diff --git a/src/svg/doc/qtsvg.qdocconf b/src/svg/doc/qtsvg.qdocconf
index 81a4359..181c6a7 100644
--- a/src/svg/doc/qtsvg.qdocconf
+++ b/src/svg/doc/qtsvg.qdocconf
@@ -25,7 +25,8 @@ depends += qtcore \
qtwidgets \
qtgui \
qtdesigner \
- qtdoc
+ qtdoc \
+ qmake
tagfile = ../../../doc/qtsvg/qtsvg.tags
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index b717107..435e51a 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2684,8 +2684,16 @@ static QSvgNode *createImageNode(QSvgNode *parent,
qreal nheight = parseLength(height, type, handler);
nheight = convertToPixels(nheight, false, type);
-
filename = filename.trimmed();
+ if (filename.isEmpty()) {
+ qWarning() << "QSvgHandler: Image filename is empty";
+ return 0;
+ }
+ if (nwidth <= 0 || nheight <= 0) {
+ qWarning() << "QSvgHandler: Width or height for" << filename << "image was not greater than 0";
+ return 0;
+ }
+
QImage image;
if (filename.startsWith(QLatin1String("data"))) {
int idx = filename.lastIndexOf(QLatin1String("base64,"));