aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickglobal.cpp
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-10-18 15:14:33 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-10-18 23:12:14 +0000
commit4867a49618e0d6a476e0549aeca5134b2e3c5892 (patch)
tree769bb64015acaa22e9c86d90cff4093877fc0ead /src/quick/util/qquickglobal.cpp
parent35fa7aed1db1157a7189ff271ebd241ebe04d2cc (diff)
Use QStringRef in a bunch of places.wip/dbus
Done automatically with clazy static analyzer. Change-Id: Ia0cf8fa24331ab102a3c3c30c2aa92ef1ba772e2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/quick/util/qquickglobal.cpp')
-rw-r--r--src/quick/util/qquickglobal.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp
index 25dd09c01f..3cb7cc3b7f 100644
--- a/src/quick/util/qquickglobal.cpp
+++ b/src/quick/util/qquickglobal.cpp
@@ -231,10 +231,10 @@ public:
int index3 = s.indexOf(QLatin1Char(','), index2+1);
bool sGood, xGood, yGood, zGood;
- qreal sCoord = s.left(index).toDouble(&sGood);
- qreal xCoord = s.mid(index+1, index2-index-1).toDouble(&xGood);
- qreal yCoord = s.mid(index2+1, index3-index2-1).toDouble(&yGood);
- qreal zCoord = s.mid(index3+1).toDouble(&zGood);
+ qreal sCoord = s.leftRef(index).toDouble(&sGood);
+ qreal xCoord = s.midRef(index+1, index2-index-1).toDouble(&xGood);
+ qreal yCoord = s.midRef(index2+1, index3-index2-1).toDouble(&yGood);
+ qreal zCoord = s.midRef(index3+1).toDouble(&zGood);
if (sGood && xGood && yGood && zGood) {
if (ok) *ok = true;
@@ -254,7 +254,7 @@ public:
QString mutableStr = s;
for (int i = 0; vOK && i < 16; ++i) {
int cidx = mutableStr.indexOf(QLatin1Char(','));
- matValues[i] = mutableStr.left(cidx).toDouble(&vOK);
+ matValues[i] = mutableStr.leftRef(cidx).toDouble(&vOK);
mutableStr = mutableStr.mid(cidx + 1);
}