summaryrefslogtreecommitdiffstats
path: root/src/svg
diff options
context:
space:
mode:
authorAriya Hidayat <ariya.hidayat@nokia.com>2009-08-31 13:42:43 (GMT)
committerAriya Hidayat <ariya.hidayat@nokia.com>2009-08-31 14:01:47 (GMT)
commit940b0b9e51f234f251d332f729531d6e9c3cea84 (patch)
tree6a220c857481d55d4d378bff12f5c83541db8f49 /src/svg
parenta8c5ded0de4b466b348080bfdef3107af39ed508 (diff)
downloadQt-940b0b9e51f234f251d332f729531d6e9c3cea84.zip
Qt-940b0b9e51f234f251d332f729531d6e9c3cea84.tar.gz
Qt-940b0b9e51f234f251d332f729531d6e9c3cea84.tar.bz2
Faster cut-off when SVG "display" attribute is not explicitly set.
Reviewed-by: Kim
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/qsvghandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 2fec215..8a68cc3 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2003,8 +2003,9 @@ static void parseOthers(QSvgNode *node,
const QSvgAttributes &attributes,
QSvgHandler *)
{
- QString displayStr = attributes.display.toString();
- displayStr = displayStr.trimmed();
+ if (attributes.display.isEmpty())
+ return;
+ QString displayStr = attributes.display.toString().trimmed();
if (!displayStr.isEmpty()) {
node->setDisplayMode(displayStringToEnum(displayStr));