summaryrefslogtreecommitdiffstats
path: root/src/svg
diff options
context:
space:
mode:
authorAriya Hidayat <ariya.hidayat@nokia.com>2009-08-31 12:09:11 (GMT)
committerAriya Hidayat <ariya.hidayat@nokia.com>2009-08-31 12:22:00 (GMT)
commite78866544d9b7f4077c59e38475fb7b6727bf075 (patch)
tree269e5bd8221e157e8dc2e1394ba1f9096a2ae81b /src/svg
parentaaef6e79698bac2b13dd8c1fc4a8ecea652da87c (diff)
downloadQt-e78866544d9b7f4077c59e38475fb7b6727bf075.zip
Qt-e78866544d9b7f4077c59e38475fb7b6727bf075.tar.gz
Qt-e78866544d9b7f4077c59e38475fb7b6727bf075.tar.bz2
Faster cut-off in SVG parsing when there is no explicit opacity.
Reviewed-by: Kim
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/qsvghandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 97205b7..abd59e5 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -1851,6 +1851,9 @@ static void parseOpacity(QSvgNode *node,
const QSvgAttributes &attributes,
QSvgHandler *)
{
+ if (attributes.opacity.isEmpty())
+ return;
+
const QString value = attributes.opacity.toString().trimmed();
bool ok = false;