diff options
| author | Lars Knoll <lars.knoll@qt.io> | 2018-05-23 13:48:50 +0200 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-23 13:18:58 +0000 |
| commit | 3e6d5d9cd1de1373f67f2ff31373a59c37f7b576 (patch) | |
| tree | cbf317a1ebbf9674e5f1a79d95411a534298713c /src/qml/jsruntime/qv4runtimecodegen.cpp | |
| parent | 20b376b64a11b4bda18aa1abda543586f04688e8 (diff) | |
Set the name of the context as early as possible
We used to set the name later on when calling
Codegen::defineFunction(), but this is too late in some
cases, especially when using the name to determine if
this function could be a QML signal handler.
Change-Id: Ie620a65ac8f17906cd9eba338cbdd3563004375d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtimecodegen.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4runtimecodegen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtimecodegen.cpp b/src/qml/jsruntime/qv4runtimecodegen.cpp index b03dce49f3..9866966936 100644 --- a/src/qml/jsruntime/qv4runtimecodegen.cpp +++ b/src/qml/jsruntime/qv4runtimecodegen.cpp @@ -54,7 +54,7 @@ void RuntimeCodegen::generateFromFunctionExpression(const QString &fileName, Compiler::ScanFunctions scan(this, sourceCode, Compiler::ContextType::Global); // fake a global environment - scan.enterEnvironment(nullptr, Compiler::ContextType::Function); + scan.enterEnvironment(nullptr, Compiler::ContextType::Function, QString()); scan(ast); scan.leaveEnvironment(); |
