diff options
author | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-08-31 12:06:28 (GMT) |
---|---|---|
committer | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-08-31 12:21:59 (GMT) |
commit | aaef6e79698bac2b13dd8c1fc4a8ecea652da87c (patch) | |
tree | 86bb876417028b4a37ed00c9f69f876a9d680297 /src | |
parent | 67f50468b296264318526ee4fec9f4fc8f2ad506 (diff) | |
download | Qt-aaef6e79698bac2b13dd8c1fc4a8ecea652da87c.zip Qt-aaef6e79698bac2b13dd8c1fc4a8ecea652da87c.tar.gz Qt-aaef6e79698bac2b13dd8c1fc4a8ecea652da87c.tar.bz2 |
Faster cut-off in SVG parsing when there is no transformation.
Reviewed-by: Kim
Diffstat (limited to 'src')
-rw-r--r-- | src/svg/qsvghandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 11a5e97..97205b7 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -1181,15 +1181,15 @@ static void parseTransform(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *) { - QString value = attributes.transform.toString(); - QString myId = someId(attributes); - value = value.trimmed(); + if (attributes.transform.isEmpty()) + return; + QString value = attributes.transform.toString().trimmed(); if (value.isEmpty()) return; QMatrix matrix = parseTransformationMatrix(value); if (!matrix.isIdentity()) { - node->appendStyleProperty(new QSvgTransformStyle(QTransform(matrix)), myId); + node->appendStyleProperty(new QSvgTransformStyle(QTransform(matrix)), someId(attributes)); } } |