diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-13 12:26:45 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-13 13:40:44 +0000 |
commit | 16154fba86798bd6bbee90eb79a9f3b26cae2fad (patch) | |
tree | 7b06b87f90730bdcc99dbb01bc9953ed599adcee /tools/qmleasing/splineeditor.cpp | |
parent | c2472e9105713784493f3df620047cab5e6cecc8 (diff) |
Tools: Fix single-character string literals.
Use character literals where applicable.
Change-Id: I55679dcc13c4c79567712c0dfaaabc2b84fee010
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'tools/qmleasing/splineeditor.cpp')
-rw-r--r-- | tools/qmleasing/splineeditor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp index b957cab4fe..9e35af6189 100644 --- a/tools/qmleasing/splineeditor.cpp +++ b/tools/qmleasing/splineeditor.cpp @@ -291,10 +291,11 @@ QString SplineEditor::generateCode() { QString s = QLatin1String("["); foreach (const QPointF &point, m_controlPoints) { - s += QString::number(point.x(), 'g', 2) + "," + QString::number(point.y(), 'g', 3) + ","; + s += QString::number(point.x(), 'g', 2) + QLatin1Char(',') + + QString::number(point.y(), 'g', 3) + QLatin1Char(','); } s.chop(1); //removing last "," - s += "]"; + s += QLatin1Char(']'); return s; } @@ -673,7 +674,7 @@ void SplineEditor::setEasingCurve(const QString &code) { if (m_block) return; - if (code.left(1) == QLatin1String("[") && code.right(1) == QLatin1String("]")) { + if (code.startsWith(QLatin1Char('[')) && code.endsWith(QLatin1Char(']'))) { QString cleanCode = code; cleanCode.remove(0, 1); cleanCode.chop(1); |