summaryrefslogtreecommitdiffstats
path: root/src/svg
diff options
context:
space:
mode:
authorAriya Hidayat <ariya.hidayat@nokia.com>2009-08-31 12:11:34 (GMT)
committerAriya Hidayat <ariya.hidayat@nokia.com>2009-08-31 12:22:00 (GMT)
commite5f823c014238469fbec6de1983a6bf0c392cbbc (patch)
treeb75e20c283def7153b6fbba77617ce7c1c0fbed2 /src/svg
parente78866544d9b7f4077c59e38475fb7b6727bf075 (diff)
downloadQt-e5f823c014238469fbec6de1983a6bf0c392cbbc.zip
Qt-e5f823c014238469fbec6de1983a6bf0c392cbbc.tar.gz
Qt-e5f823c014238469fbec6de1983a6bf0c392cbbc.tar.bz2
Use QStringRef in parseVisibility for SVG parsing.
Reviewed-by: Kim
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/qsvghandler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index abd59e5..b8266f7 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -1198,12 +1198,11 @@ static void parseVisibility(QSvgNode *node,
const QSvgAttributes &attributes,
QSvgHandler *)
{
- QString value = attributes.visibility.toString();
QSvgNode *parent = node->parent();
- if (parent && (value.isEmpty() || value == QT_INHERIT))
+ if (parent && (attributes.visibility.isEmpty() || attributes.visibility == QT_INHERIT))
node->setVisible(parent->isVisible());
- else if (value == QLatin1String("hidden") || value == QLatin1String("collapse")) {
+ else if (attributes.visibility == QLatin1String("hidden") || attributes.visibility == QLatin1String("collapse")) {
node->setVisible(false);
} else
node->setVisible(true);