aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal.cpp
diff options
context:
space:
mode:
authorFrank Meerkoetter <frank.meerkoetter@basyskom.com>2016-05-06 16:08:20 +0200
committerFrank Meerkoetter <frank.meerkoetter@basyskom.com>2016-05-09 13:21:47 +0000
commit7234a59e03e0e0088c0be5c4fed1d500d3c4f029 (patch)
treedc7277c8bdf09662f4108109c7ca5344ca638d95 /src/qml/qml/qqmlboundsignal.cpp
parent58bedefe772a83baa8809d7f3f4a683fa35f1ba8 (diff)
Scrape off a few allocations by using the QStringBuilder
Change-Id: I7689fabb5398c2c2d2781b2c788dcc60f4e1ea44 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index c1e6543b86..b03edc9020 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -80,9 +80,7 @@ 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 += QStringLiteral("(function ");
- function += handlerName;
- function += QLatin1Char('(');
+ function += QStringLiteral("(function ") + handlerName + QLatin1Char('(');
if (parameterString.isEmpty()) {
QString error;
@@ -98,10 +96,7 @@ QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index,
} else
function += parameterString;
- function += QStringLiteral(") { ");
- function += expression;
- function += QStringLiteral(" })");
-
+ function += QStringLiteral(") { ") + expression + QStringLiteral(" })");
m_function.set(v4, evalFunction(context(), scopeObject(), function, fileName, line));
if (m_function.isNullOrUndefined())