diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2025-01-24 15:30:16 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2025-02-04 16:49:20 +0100 |
| commit | c9778d2e9c41036cbd59976c51927d746bb78bcc (patch) | |
| tree | 8d707606da595851d48f178f946c481bf290ce0a /src/qml/jsruntime/qv4functionobject.cpp | |
| parent | c350c3888ec2a24e6d4cbf1d644a0867d4eabc67 (diff) | |
QtQml: Fix assignment of fileName and URL during compilation
We need to assign them right away when creating the module. If we do it
later on, there are a lot of different code paths to cover and in fact
we were missing some.
Pick-to: 6.9 6.8
Task-number: QTBUG-133053
Change-Id: I57e381c787f504eb9bcd8c2041e41b4f1d1f8b53
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index e9f91fbc06..1a812790b4 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -236,11 +236,11 @@ QQmlRefPointer<ExecutableCompilationUnit> FunctionCtor::parse(ExecutionEngine *e return nullptr; } - Compiler::Module module(engine->debugger() != nullptr); + Compiler::Module module(QString(), QString(), engine->debugger() != nullptr); Compiler::JSUnitGenerator jsGenerator(&module); RuntimeCodegen cg(engine, &jsGenerator, false); - cg.generateFromFunctionExpression(QString(), function, fe, &module); + cg.generateFromFunctionExpression(function, fe, &module); if (engine->hasException) return nullptr; |
