summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriya Hidayat <ariya.hidayat@nokia.com>2009-08-31 12:06:28 (GMT)
committerAriya Hidayat <ariya.hidayat@nokia.com>2009-08-31 12:21:59 (GMT)
commitaaef6e79698bac2b13dd8c1fc4a8ecea652da87c (patch)
tree86bb876417028b4a37ed00c9f69f876a9d680297
parent67f50468b296264318526ee4fec9f4fc8f2ad506 (diff)
downloadQt-aaef6e79698bac2b13dd8c1fc4a8ecea652da87c.zip
Qt-aaef6e79698bac2b13dd8c1fc4a8ecea652da87c.tar.gz
Qt-aaef6e79698bac2b13dd8c1fc4a8ecea652da87c.tar.bz2
Faster cut-off in SVG parsing when there is no transformation.
Reviewed-by: Kim
-rw-r--r--src/svg/qsvghandler.cpp8
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));
}
}