diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-29 15:23:34 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-06 13:01:38 +0000 |
commit | 83aa1933c82333b7ec5128442ac9ee2161387491 (patch) | |
tree | b80507888b817e05c795fbd4b917fc00412b6827 /src/qml/jsruntime/qv4function_p.h | |
parent | e31e72925f857be56c77b494c0fa10e55de72cfc (diff) |
Add a sourceLocation() accessor to QV4::Function
Change-Id: I3a38ee44ce46c2416ceef153ce631bc15fd461fe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4function_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4function_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h index 6e0ba9d764..12094a0943 100644 --- a/src/qml/jsruntime/qv4function_p.h +++ b/src/qml/jsruntime/qv4function_p.h @@ -51,6 +51,7 @@ // #include "qv4global_p.h" +#include <private/qqmlglobal_p.h> #include <private/qv4compileddata_p.h> QT_BEGIN_NAMESPACE @@ -89,6 +90,11 @@ struct Q_QML_EXPORT Function { inline bool needsActivation() const { return activationRequired; } + QQmlSourceLocation sourceLocation() const + { + return QQmlSourceLocation(sourceFile(), compiledFunction->location.line, compiledFunction->location.column); + } + }; } |