aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmleasing
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-13 12:26:45 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-13 13:40:44 +0000
commit16154fba86798bd6bbee90eb79a9f3b26cae2fad (patch)
tree7b06b87f90730bdcc99dbb01bc9953ed599adcee /tools/qmleasing
parentc2472e9105713784493f3df620047cab5e6cecc8 (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')
-rw-r--r--tools/qmleasing/segmentproperties.cpp2
-rw-r--r--tools/qmleasing/splineeditor.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/qmleasing/segmentproperties.cpp b/tools/qmleasing/segmentproperties.cpp
index cfc10b7f54..cf49b2488c 100644
--- a/tools/qmleasing/segmentproperties.cpp
+++ b/tools/qmleasing/segmentproperties.cpp
@@ -103,7 +103,7 @@ void SegmentProperties::invalidate()
{
m_blockSignals = true;
- m_ui_pane_p.label->setText(QLatin1String("p") + QString::number(m_segment));
+ m_ui_pane_p.label->setText(QLatin1Char('p') + QString::number(m_segment));
m_ui_pane_p.smooth->setChecked(m_smooth);
m_ui_pane_p.smooth->parentWidget()->setEnabled(!m_last);
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);