diff options
Diffstat (limited to 'src/svg/qsvghandler.cpp')
-rw-r--r-- | src/svg/qsvghandler.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 4f8c172..d373a99 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -62,8 +62,6 @@ QT_BEGIN_NAMESPACE static const char *qt_inherit_text = "inherit"; #define QT_INHERIT QLatin1String(qt_inherit_text) -Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok); - // ======== duplicated from qcolor_p static inline int qsvg_h2i(char hex) @@ -627,8 +625,7 @@ static qreal toDouble(const QChar *&str) if (neg) val = -val; } else { - bool ok = false; - val = qstrtod(temp, 0, &ok); + val = QByteArray::fromRawData(temp, pos).toDouble(); } return val; @@ -2286,10 +2283,12 @@ static bool parseAnimateColorNode(QSvgNode *parent, QColor startColor, endColor; resolveColor(fromStr, startColor, handler); resolveColor(toStr, endColor, handler); + colors.reserve(2); colors.append(startColor); colors.append(endColor); } else { QStringList str = valuesStr.split(QLatin1Char(';')); + colors.reserve(str.count()); QStringList::const_iterator itr; for (itr = str.constBegin(); itr != str.constEnd(); ++itr) { QColor color; |