diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2013-12-16 15:30:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-21 15:57:58 +0100 |
commit | 4cf8a6ad7189991ff6852f4096fa8673ffa98bf0 (patch) | |
tree | 5660c4037754ef500d758fcd9c3a51dfc4d46552 /src/qml/qml/qqmlcompiler.cpp | |
parent | d5f5b3f87dc376b237c81d150a8d36cbb525e12e (diff) |
Parse source location for signal handling functions
Previously the source location of signal handlers was always line 0 and
column 0. This poses problems when trying to extract meaningful
profiling information. The change assigns the source location of the
statement declaring the function as the function's source location.
Task-number: QTCREATORBUG-11100
Change-Id: I4bb8682b35147a7cfe4ecec342d4a00623bb1e0d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcompiler.cpp')
-rw-r--r-- | src/qml/qml/qqmlcompiler.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 3dd9d6a14d..71e803a4c8 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -1681,6 +1681,7 @@ static AST::FunctionDeclaration *convertSignalHandlerExpressionToFunctionDeclara AST::FunctionBody *body = new (pool) AST::FunctionBody(elements); AST::FunctionDeclaration *functionDeclaration = new (pool) AST::FunctionDeclaration(jsEngine->newStringRef(signalName), paramList, body); + functionDeclaration->functionToken = statement->firstSourceLocation(); return functionDeclaration; } |