diff options
author | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-08-31 13:15:19 (GMT) |
---|---|---|
committer | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-08-31 13:16:03 (GMT) |
commit | 2b950244a3615c2611a636afbf372411c9db491c (patch) | |
tree | 53deda422521a46e7799637f2a9cef42376eff8d /src/svg | |
parent | 444ddca247cacc5376821e82588b1d8b76133437 (diff) | |
download | Qt-2b950244a3615c2611a636afbf372411c9db491c.zip Qt-2b950244a3615c2611a636afbf372411c9db491c.tar.gz Qt-2b950244a3615c2611a636afbf372411c9db491c.tar.bz2 |
Fix wrong checks in commit fd8ced2f.
We should use the newly create QStringRef, after all that is the idea
of the optimization.
Diffstat (limited to 'src/svg')
-rw-r--r-- | src/svg/qsvghandler.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index d0b52da..344e2b1 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -181,21 +181,21 @@ QSvgAttributes::QSvgAttributes(const QXmlStreamAttributes &xmlAttributes, QSvgHa case 's': if (name.length() > 5 && QStringRef(name.string(), name.position() + 1, 5) == QLatin1String("troke")) { QStringRef strokeRef(name.string(), name.position() + 6, name.length() - 6); - if (name.isEmpty()) + if (strokeRef.isEmpty()) stroke = value; - else if (name == QLatin1String("-dasharray")) + else if (strokeRef == QLatin1String("-dasharray")) strokeDashArray = value; - else if (name == QLatin1String("-dashoffset")) + else if (strokeRef == QLatin1String("-dashoffset")) strokeDashOffset = value; - else if (name == QLatin1String("-linecap")) + else if (strokeRef == QLatin1String("-linecap")) strokeLineCap = value; - else if (name == QLatin1String("-linejoin")) + else if (strokeRef == QLatin1String("-linejoin")) strokeLineJoin = value; - else if (name == QLatin1String("-miterlimit")) + else if (strokeRef == QLatin1String("-miterlimit")) strokeMiterLimit = value; - else if (name == QLatin1String("-opacity")) + else if (strokeRef == QLatin1String("-opacity")) strokeOpacity = value; - else if (name == QLatin1String("-width")) + else if (strokeRef == QLatin1String("-width")) strokeWidth = value; } else if (name == QLatin1String("stop-color")) @@ -276,21 +276,21 @@ QSvgAttributes::QSvgAttributes(const QXmlStreamAttributes &xmlAttributes, QSvgHa case 's': if (name.length() > 5 && QStringRef(name.string(), name.position() + 1, 5) == QLatin1String("troke")) { QStringRef strokeRef(name.string(), name.position() + 6, name.length() - 6); - if (name.isEmpty()) + if (strokeRef.isEmpty()) stroke = value; - else if (name == QLatin1String("-dasharray")) + else if (strokeRef == QLatin1String("-dasharray")) strokeDashArray = value; - else if (name == QLatin1String("-dashoffset")) + else if (strokeRef == QLatin1String("-dashoffset")) strokeDashOffset = value; - else if (name == QLatin1String("-linecap")) + else if (strokeRef == QLatin1String("-linecap")) strokeLineCap = value; - else if (name == QLatin1String("-linejoin")) + else if (strokeRef == QLatin1String("-linejoin")) strokeLineJoin = value; - else if (name == QLatin1String("-miterlimit")) + else if (strokeRef == QLatin1String("-miterlimit")) strokeMiterLimit = value; - else if (name == QLatin1String("-opacity")) + else if (strokeRef == QLatin1String("-opacity")) strokeOpacity = value; - else if (name == QLatin1String("-width")) + else if (strokeRef == QLatin1String("-width")) strokeWidth = value; } else if (name == QLatin1String("stop-color")) |