diff options
author | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2016-05-06 16:08:20 +0200 |
---|---|---|
committer | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2016-05-09 13:21:47 +0000 |
commit | 7234a59e03e0e0088c0be5c4fed1d500d3c4f029 (patch) | |
tree | dc7277c8bdf09662f4108109c7ca5344ca638d95 /src/qml/qml/qqmlboundsignal.cpp | |
parent | 58bedefe772a83baa8809d7f3f4a683fa35f1ba8 (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.cpp | 9 |
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()) |