diff options
author | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-08-28 16:52:54 +0200 |
---|---|---|
committer | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-08-31 10:35:09 +0200 |
commit | 37da3aefc073ea3a27c8bb5293b27faa4dcb5cc0 (patch) | |
tree | 88eb8ed4d0fc54972f3346e50e9da7de4d1c2b59 | |
parent | 2c6afc04de97d4ef6bcf7da098f57284f8d928e5 (diff) | |
download | qt4-tools-37da3aefc073ea3a27c8bb5293b27faa4dcb5cc0.tar.gz |
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
-rw-r--r-- | src/svg/qsvghandler.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 5b778d20e1..44f5b6dd07 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<QSvgCssAttribute> 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<QSvgGradientStyle*>(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; |