diff options
-rw-r--r-- | .qmake.conf | 2 | ||||
-rw-r--r-- | src/svg/qsvgfunctions_wince.cpp | 4 | ||||
-rw-r--r-- | src/svg/qsvggraphics.cpp | 7 | ||||
-rw-r--r-- | src/svg/qsvghandler.cpp | 7 |
4 files changed, 11 insertions, 9 deletions
diff --git a/.qmake.conf b/.qmake.conf index 58db72c..fc13c75 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) CONFIG += qt_example_installs CONFIG += warning_clean -MODULE_VERSION = 5.5.1 +MODULE_VERSION = 5.6.0 diff --git a/src/svg/qsvgfunctions_wince.cpp b/src/svg/qsvgfunctions_wince.cpp index 108c31f..d2e63ca 100644 --- a/src/svg/qsvgfunctions_wince.cpp +++ b/src/svg/qsvgfunctions_wince.cpp @@ -36,7 +36,9 @@ #include <winbase.h> #include <kfuncs.h> #include <stdio.h> +#if _WIN32_WCE < 0x800 #include <altcecrt.h> +#endif #include "qplatformdefs.h" #include "qsvgfunctions_wince_p.h" @@ -51,6 +53,7 @@ extern "C" { #endif // File I/O --------------------------------------------------------- +#if _WIN32_WCE < 0x800 int errno = 0; int qt_wince_open(const char *filename, int oflag, int pmode) @@ -116,6 +119,7 @@ int qt_wince__close(int handle) return 0; return fclose((FILE*)handle); } +#endif #ifdef __cplusplus } // extern "C" diff --git a/src/svg/qsvggraphics.cpp b/src/svg/qsvggraphics.cpp index 3a3830d..e297a76 100644 --- a/src/svg/qsvggraphics.cpp +++ b/src/svg/qsvggraphics.cpp @@ -311,9 +311,8 @@ void QSvgText::draw(QPainter *p, QSvgExtraStates &states) bool appendSpace = false; QVector<QString> paragraphs; QStack<QTextCharFormat> formats; - QVector<QList<QTextLayout::FormatRange> > formatRanges; + QVector<QVector<QTextLayout::FormatRange> > formatRanges(1); paragraphs.push_back(QString()); - formatRanges.push_back(QList<QTextLayout::FormatRange>()); for (int i = 0; i < m_tspans.size(); ++i) { if (m_tspans[i] == LINEBREAK) { @@ -332,7 +331,7 @@ void QSvgText::draw(QPainter *p, QSvgExtraStates &states) } appendSpace = false; paragraphs.push_back(QString()); - formatRanges.push_back(QList<QTextLayout::FormatRange>()); + formatRanges.resize(formatRanges.size() + 1); } } else { WhitespaceMode mode = m_tspans[i]->whitespaceMode(); @@ -394,7 +393,7 @@ void QSvgText::draw(QPainter *p, QSvgExtraStates &states) QTextOption op = tl.textOption(); op.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); tl.setTextOption(op); - tl.setAdditionalFormats(formatRanges[i]); + tl.setFormats(formatRanges[i]); tl.beginLayout(); forever { diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 435e51a..b531499 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) @@ -626,8 +624,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; @@ -2285,10 +2282,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; |