diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-13 13:11:01 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-13 13:11:01 +0100 |
commit | 56cccc0b65c03b8e5df72a61d6bd402171edf5ba (patch) | |
tree | 6baf02f06aebd6e1eec9c793b7f0698abc0192e4 /src/svg | |
parent | 684283ae80a6d844e80ac5f9ce4a816a3766a4f7 (diff) | |
parent | 80b42d91a19a0ae9e2c15d9e0a9f828eaa45627d (diff) | |
download | qtsvg-56cccc0b65c03b8e5df72a61d6bd402171edf5ba.tar.gz |
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I960859c8b76749294939042658b5ded3dfa10993
Diffstat (limited to 'src/svg')
-rw-r--r-- | src/svg/doc/qtsvg.qdocconf | 3 | ||||
-rw-r--r-- | src/svg/qsvghandler.cpp | 10 |
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,")); |