Re: [Interest] Question about QtDeclarative Internals

2021-04-21 Thread Volker Hilsheimer
> On 21 Apr 2021, at 15:48, Alex Shaw  wrote:
> 
> Hello,
> 
> I am relatively new to mailing lists, so if I am doing something wrong here 
> please forgive me.
> 
> Is this the place to ask questions about the internals of Qt modules?
> 
> More specifically:
> 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 modules to be registered 
> in C++ (similar to Node.js: import fs from "fs")
> The planned method is something along the lines of:
> void QJSEngine::registerModule(const QString , const QJSValue 
> )
> 
> I can see that behind the scenes, loadModule compiles a URL to an 
> ExecutableCompilationUnit, then saves it to a list of modules for future 
> lookup.
> I thought the easiest way to do what I need is to convert a QJSValue to an 
> internal QV4::Value, and from there into an ExecutableCompilationUnit.
> Is there any way of doing that?
> 

Hi Alex,

Welcome to the list! The โ€œinterest" list is primarily useful to discuss 
developing *with* Qt.

The development *of* Qt, which patching of QJSEngine would qualify as, is best 
discussed at

https://lists.qt-project.org/listinfo/development



Cheers,
Volker

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Question about QtDeclarative Internals

2021-04-21 Thread Giuseppe D'Angelo via Interest

Hi Alex,

On 21/04/2021 15:48, Alex Shaw wrote:
I am relatively new to mailing lists, so if I am doing something wrong 
here please forgive me.


Is this the place to ask questions about the internals of Qt modules?


I'd actually recommend you to ask this question on the development@ 
mailing list. That's what most developers of Qt lurk. (interest@ is 
people who develop WITH Qt.)


Thanks,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Question about QtDeclarative Internals

2021-04-21 Thread Alex Shaw
Hello,

I am relatively new to mailing lists, so if I am doing something wrong here
please forgive me.

Is this the place to ask questions about the internals of Qt modules?

More specifically:
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 modules to be
registered in C++ (similar to Node.js: import fs from "fs")
The planned method is something along the lines of:
void QJSEngine::registerModule(const QString , const QJSValue
)

I can see that behind the scenes, loadModule compiles a URL to an
ExecutableCompilationUnit, then saves it to a list of modules for future
lookup.
I thought the easiest way to do what I need is to convert a QJSValue to an
internal QV4::Value, and from there into an ExecutableCompilationUnit.
Is there any way of doing that?

Thanks.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest