diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/jsruntime/qv4globalobject.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlstringconverters.cpp | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp index 110a2c9089..b4733356ac 100644 --- a/src/qml/jsruntime/qv4globalobject.cpp +++ b/src/qml/jsruntime/qv4globalobject.cpp @@ -302,7 +302,7 @@ static QString decode(const QString &input, DecodeMode decodeMode, bool *ok) ++r; } if (*r) - output.append(input.mid(start, i - start + 1)); + output.append(input.midRef(start, i - start + 1)); else output.append(QChar(b)); } else { diff --git a/src/qml/qml/qqmlstringconverters.cpp b/src/qml/qml/qqmlstringconverters.cpp index eb0afda927..6a5c0736cf 100644 --- a/src/qml/qml/qqmlstringconverters.cpp +++ b/src/qml/qml/qqmlstringconverters.cpp @@ -137,8 +137,8 @@ QPointF QQmlStringConverters::pointFFromString(const QString &s, bool *ok) bool xGood, yGood; int index = s.indexOf(QLatin1Char(',')); - qreal xCoord = s.left(index).toDouble(&xGood); - qreal yCoord = s.mid(index+1).toDouble(&yGood); + qreal xCoord = s.leftRef(index).toDouble(&xGood); + qreal yCoord = s.midRef(index+1).toDouble(&yGood); if (!xGood || !yGood) { if (ok) *ok = false; @@ -161,8 +161,8 @@ QSizeF QQmlStringConverters::sizeFFromString(const QString &s, bool *ok) bool wGood, hGood; int index = s.indexOf(QLatin1Char('x')); - qreal width = s.left(index).toDouble(&wGood); - qreal height = s.mid(index+1).toDouble(&hGood); + qreal width = s.leftRef(index).toDouble(&wGood); + qreal height = s.midRef(index+1).toDouble(&hGood); if (!wGood || !hGood) { if (ok) *ok = false; @@ -185,12 +185,12 @@ QRectF QQmlStringConverters::rectFFromString(const QString &s, bool *ok) bool xGood, yGood, wGood, hGood; int index = s.indexOf(QLatin1Char(',')); - qreal x = s.left(index).toDouble(&xGood); + qreal x = s.leftRef(index).toDouble(&xGood); int index2 = s.indexOf(QLatin1Char(','), index+1); - qreal y = s.mid(index+1, index2-index-1).toDouble(&yGood); + qreal y = s.midRef(index+1, index2-index-1).toDouble(&yGood); index = s.indexOf(QLatin1Char('x'), index2+1); - qreal width = s.mid(index2+1, index-index2-1).toDouble(&wGood); - qreal height = s.mid(index+1).toDouble(&hGood); + qreal width = s.midRef(index2+1, index-index2-1).toDouble(&wGood); + qreal height = s.midRef(index+1).toDouble(&hGood); if (!xGood || !yGood || !wGood || !hGood) { if (ok) *ok = false; |