diff options
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index f7ece53121..a5e23978d7 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -188,7 +188,10 @@ void QQmlBoundSignalExpression::evaluate(void **a) Q_ASSERT(!m_extra.isNull()); QString expression; - expression = QStringLiteral("(function "); + // 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. + expression.fill(QChar(QChar::Space), qMax(m_extra->m_sourceLocation.column, (quint16)2) - 2); + expression += QStringLiteral("(function "); expression += m_extra->m_handlerName; expression += QLatin1Char('('); |