summaryrefslogtreecommitdiff
path: root/src/declarative/qml/qdeclarativecustomparser.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-02-01 08:07:39 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-09 01:34:24 +0100
commit5060b58fdde00ca3fa4dc29bd58b80138a271b10 (patch)
tree7b64064c463c4184e1666f6539ca60a9cac3f91e /src/declarative/qml/qdeclarativecustomparser.cpp
parente8420af07158dc3aa5c6ea7ddae6f8be4976e454 (diff)
downloadqtdeclarative-5060b58fdde00ca3fa4dc29bd58b80138a271b10.tar.gz
Rewrite multiline strings properly
Because the bindings rewriter works on code strings, it would leave multiline strings across multiple lines (which is illegal in ECMAScript. It now manually breaks them up when it sees them, by replacing a \n character with a literal \n. Since RewriteSignalHandler now likes to have the AST passed in too, the related method in QDeclarativeCompiler (and its customers) have been altered to use the QDeclarativeScript::Value instead of just a string. Task-number: QTBUG-23387 Change-Id: Id060de37e70590c9da2a902038ed02d948fdd70f Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativecustomparser.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecustomparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativecustomparser.cpp b/src/declarative/qml/qdeclarativecustomparser.cpp
index 7b0946ba71..a746700aa6 100644
--- a/src/declarative/qml/qdeclarativecustomparser.cpp
+++ b/src/declarative/qml/qdeclarativecustomparser.cpp
@@ -311,9 +311,9 @@ QDeclarativeBinding::Identifier QDeclarativeCustomParser::rewriteBinding(const Q
Returns a rewritten \a handler. \a name
is used as the name of the rewritten function.
*/
-QString QDeclarativeCustomParser::rewriteSignalHandler(const QString &handler, const QString &name)
+QString QDeclarativeCustomParser::rewriteSignalHandler(const QDeclarativeScript::Variant &value, const QString &name)
{
- return compiler->rewriteSignalHandler(handler, name);
+ return compiler->rewriteSignalHandler(value , name);
}
QT_END_NAMESPACE