From 37da3aefc073ea3a27c8bb5293b27faa4dcb5cc0 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Fri, 28 Aug 2009 16:52:54 +0200 Subject: No need for the namespaced version in QSvgAttributes::value(). We do not really use this function with proper namespace URI, so let us get rid of the function. Reviewed-by: Kim --- src/svg/qsvghandler.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 5b778d2..44f5b6d 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -82,7 +82,6 @@ struct QSvgAttributes QSvgAttributes(const QXmlStreamAttributes &xmlAttributes, QSvgHandler *handler); QStringRef value(const QLatin1String &name) const; - QStringRef value(const QString &namespaceUri, const QLatin1String &name) const; QXmlStreamAttributes m_xmlAttributes; QVector m_cssAttributes; @@ -110,20 +109,6 @@ QStringRef QSvgAttributes::value(const QLatin1String &name) const return v; } -QStringRef QSvgAttributes::value(const QString &namespaceUri, const QLatin1String &name) const -{ - QStringRef v = m_xmlAttributes.value(namespaceUri, name); - if (v.isEmpty()) { - for (int i = 0; i < m_cssAttributes.count(); ++i) { - if (m_cssAttributes.at(i).name == name) { - v = m_cssAttributes.at(i).value; - break; - } - } - } - return v; -} - static inline QString someId(const QXmlStreamAttributes &attributes) { QString id = attributes.value(QLatin1String("id")).toString(); @@ -2698,9 +2683,9 @@ static bool parseStopNode(QSvgStyleProperty *parent, QSvgGradientStyle *style = static_cast(parent); - QString offsetStr = attrs.value(QString(), QLatin1String("offset")).toString(); - QString colorStr = attrs.value(QString(), QLatin1String("stop-color")).toString(); - QString opacityStr = attrs.value(QString(), QLatin1String("stop-opacity")).toString(); + QString offsetStr = attrs.value(QLatin1String("offset")).toString(); + QString colorStr = attrs.value(QLatin1String("stop-color")).toString(); + QString opacityStr = attrs.value(QLatin1String("stop-opacity")).toString(); QColor color; bool ok = true; -- cgit v0.12