diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2024-04-26 13:59:43 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-05-23 13:28:15 +0200 |
| commit | f62adc926f34cb28831ead07d716fedd8d6d6c7b (patch) | |
| tree | a15968bce99717e274d1d8042595744507f11b3a /src/qml/jsruntime/qv4engine.cpp | |
| parent | 464587f4bd4b909a1231c27db63e3cf22dd501f5 (diff) | |
QtQml: Let QQmlTypeWrapper act as a constructor for its type
This calls any invokable ctors and only invokable ctors. Any
type that doesn't have an invokable ctor won't even expose a
function, since functions are determined by the presence of call
methods.
QMetaObjectWrapper gains the same functionality since the code is
shared. It can now not only create object types but also value types.
Task-number: QTBUG-124662
Change-Id: Ib30098666f67aef7a1f464f52d9b0bbd70d896d1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 8450959de4..bd6251caa9 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -740,6 +740,7 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine) static_cast<DataViewPrototype *>(dataViewPrototype())->init(this, dataViewCtor()); jsObjects[ValueTypeProto] = (Heap::Base *) nullptr; jsObjects[SignalHandlerProto] = (Heap::Base *) nullptr; + jsObjects[TypeWrapperProto] = (Heap::Base *) nullptr; jsObjects[IntrinsicTypedArray_Ctor] = memoryManager->allocate<IntrinsicTypedArrayCtor>(this); jsObjects[IntrinsicTypedArrayProto] = memoryManager->allocate<IntrinsicTypedArrayPrototype>(); |
