aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-07-20 14:23:59 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-09 18:00:36 +0000
commitb11421394b4745253a046461234906feb9c811dc (patch)
tree6c7770fd9c161e44eb3de44de96e6d797f04e2ea /src/qml/qml/qqmlboundsignal.cpp
parent4fbfbf7fe8e6f8f31b5704a0f8f55415a7284523 (diff)
Qml: optimize string usage
Use QStringBuilder more. Use QString::asprintf instead of arg()'s chain. Use += operator to reserve extra capacity for possible free following append/prepend/+= call. Change-Id: Ib65398b91566994339d2c4bbfaf94e49806b7471 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index ef837183db..4e63790290 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -80,8 +80,8 @@ QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index,
// Add some leading whitespace to account for the binding's column offset.
// It's 2 off because a, we start counting at 1 and b, the '(' below is not counted.
- function.fill(QChar(QChar::Space), qMax(column, (quint16)2) - 2);
- function += QLatin1String("(function ") + handlerName + QLatin1Char('(');
+ function += QString(qMax(column, (quint16)2) - 2, QChar(QChar::Space))
+ + QLatin1String("(function ") + handlerName + QLatin1Char('(');
if (parameterString.isEmpty()) {
QString error;