From 16154fba86798bd6bbee90eb79a9f3b26cae2fad Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 13 Oct 2015 12:26:45 +0200 Subject: Tools: Fix single-character string literals. Use character literals where applicable. Change-Id: I55679dcc13c4c79567712c0dfaaabc2b84fee010 Reviewed-by: Ulf Hermann --- tools/qmleasing/splineeditor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/qmleasing/splineeditor.cpp') 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); -- cgit v1.2.3