Hi Alex,
the simplest way I can see here would not be a compilation unit. The
compilation unit is only needed if you want to run JavaScript. The place
where the imports of a script are saved is
QV4::CompiledData::CompilationUnitBase::imports of the _importing_ unit.
That's an array QV4::Stati
Hello Fabian,
Thanks for replying.
The QJSValue represents any basic JS type that could be exported from a
regular module.
For example:
export const MAGIC = 6;
export default {
name: "Qt6",
version: "6.1.3"
}
In C++:
QJSValue magic(6);
QJSValue name("Qt6");
QJSValue version("6.1.3");
QJSValu
Hi,
there is certainly no straightforward way from QV4::Value to
ExecutableCompilationUnit, especially considering that the Value can be
anything, from a primitive like bool or undefined to basically arbitrary
objects managed on the engine's heap.
Could you expand a bit more how exactly you en
> Hello,
>
> In QtDeclarative, can a QV4::ReturnedValue or a QV4::Value be converted into
> an ExecutableCompilationUnit?
>
> I'm trying to work on a patch for QJSEngine to allow importing modules from
> C++ (similar to Node.js: import fs from "fs")
> The planned method is something along the
Hello,
In QtDeclarative, can a QV4::ReturnedValue or a QV4::Value be converted
into an ExecutableCompilationUnit?
I'm trying to work on a patch for QJSEngine to allow importing modules from
C++ (similar to Node.js: import fs from "fs")
The planned method is something along the lines of:
void QJSE