![]() |
Qt 6.x
The Qt SDK
|
#include <qv4qobjectwrapper_p.h>
Public Types | |
enum | Flag { NoFlag = 0x0 , CheckRevision = 0x1 , AttachMethods = 0x2 , AllowOverride = 0x4 , IncludeImports = 0x8 } |
![]() | |
enum | { NInlineProperties = 2 } |
enum | { IsObject = true , GetterOffset = 0 , SetterOffset = 1 } |
enum | ThrowOnFailure { DoThrowOnRejection , DoNotThrow } |
![]() | |
enum | { IsExecutionContext = false , IsString = false , IsStringOrSymbol = false , IsObject = false , IsFunctionObject = false , IsErrorObject = false , IsArrayData = false } |
enum | { NInlineProperties = 0 } |
enum | Type { Type_Invalid , Type_String , Type_Object , Type_Symbol , Type_ArrayObject , Type_FunctionObject , Type_GeneratorObject , Type_BooleanObject , Type_NumberObject , Type_StringObject , Type_SymbolObject , Type_DateObject , Type_RegExpObject , Type_ErrorObject , Type_ArgumentsObject , Type_JsonObject , Type_MathObject , Type_ProxyObject , Type_UrlObject , Type_UrlSearchParamsObject , Type_ExecutionContext , Type_InternalClass , Type_SetIteratorObject , Type_MapIteratorObject , Type_ArrayIteratorObject , Type_StringIteratorObject , Type_ForInIterator , Type_RegExp , Type_V4Sequence , Type_QmlListProperty } |
![]() | |
using | ManagedPtr = Managed * |
![]() | |
enum class | TagBit { SpecialNegative = 0b10000000000000000000 << 12 , SpecialQNaN = 0b00000000000010000000 << 12 , Special = 0b00000000000001000000 << 12 , IntCompat = 0b00000000000000100000 << 12 , Unmanaged = 0b00000000000000010000 << 12 , IntOrBool = 0b00000000000000001000 << 12 , Number = 0b00000000000000000100 << 12 } |
enum | Type { Managed_Type = 0 , Double_Type = 1 , Undefined_Type = 2 , Empty_Type = quint32(TagBit::Unmanaged) , Null_Type = Empty_Type | quint32(TagBit::IntCompat) , Boolean_Type = Null_Type | quint32(TagBit::IntOrBool) , Integer_Type = Boolean_Type | quint32(TagBit::Number) } |
enum | { Tag_Shift = 32 , IsIntegerConvertible_Shift = 48 , IsIntegerConvertible_Value = 3 , IsIntegerOrBool_Shift = 47 , IsIntegerOrBool_Value = 7 } |
enum class | QuickType : quint32 { Managed = Managed_Type , Empty = Empty_Type , Null = Null_Type , Boolean = Boolean_Type , Integer = Integer_Type , PlusInf = quint32(TagBit::Number) | quint32(TagBit::Special) | quint32(TagBit::Unmanaged) , MinusInf = PlusInf | quint32(TagBit::SpecialNegative) , NaN = PlusInf | quint32(TagBit::SpecialQNaN) , MinusNaN = NaN | quint32(TagBit::SpecialNegative) } |
enum | { QT_Empty = Empty_Type , QT_Null = Null_Type , QT_Bool = Boolean_Type , QT_Int = Integer_Type , QuickType_Shift = Tag_Shift } |
using | HeapBasePtr = Heap::Base * |
using | ValueTypeInternal = QuickType |
Protected Member Functions | |
const QQmlPropertyData * | findProperty (const QQmlRefPointer< QQmlContextData > &qmlContext, String *name, Flags flags, QQmlPropertyData *local) const |
Definition at line 127 of file qv4qobjectwrapper_p.h.
Enumerator | |
---|---|
NoFlag | |
CheckRevision | |
AttachMethods | |
AllowOverride | |
IncludeImports |
Definition at line 132 of file qv4qobjectwrapper_p.h.
|
staticprotected |
Definition at line 794 of file qv4qobjectwrapper.cpp.
References args, cache, engine, and QQmlData::ensurePropertyCache().
void QV4::QObjectWrapper::destroyObject | ( | bool | lastCall | ) |
Definition at line 1346 of file qv4qobjectwrapper.cpp.
References QV4::WeakValue::clear(), QQmlData::context, d, QQmlRefPointer< T >::data(), QQmlData::disconnectNotifiers(), QQmlContextData::emitDestruction(), QQmlData::get(), QQmlData::indestructible, QQmlData::isQueuedForDeletion, QQmlData::jsWrapper, o, QQmlData::ownContext, QQmlData::propertyCache, Q_ASSERT, and QQmlRefPointer< T >::reset().
|
protected |
Definition at line 227 of file qv4qobjectwrapper.cpp.
References d, and qmlContext().
|
staticprotected |
Definition at line 234 of file qv4qobjectwrapper.cpp.
References QQmlData::get(), o, QQmlPropertyCache::property(), QQmlData::propertyCache, Q_UNUSED, and qmlContext().
Referenced by virtualGetOwnProperty().
|
inline |
Definition at line 276 of file qv4object_p.h.
|
inline |
Definition at line 270 of file qv4object_p.h.
|
inline |
Definition at line 272 of file qv4object_p.h.
|
static |
Definition at line 249 of file qv4qobjectwrapper.cpp.
References QQmlPropertyCapture::captureProperty(), engine, QQmlPropertyCapture::expression, QQmlData::flushPendingBinding(), QQmlVMEMetaObject::get(), QQmlEnginePrivate::get(), global, QV4::loadProperty(), QQmlJavaScriptExpression::mustCaptureBindableProperty(), property, QQmlEnginePrivate::propertyCapture, Q_ASSERT, QQmlVMEMetaObject::vmeMethod(), QQmlVMEMetaObject::vmeProperty(), and wrapper().
Referenced by lookupMethodGetterImpl(), lookupPropertyGetterImpl(), and QV4::QObjectWrapperOwnPropertyKeyIterator::next().
ReturnedValue QV4::QObjectWrapper::getQmlProperty | ( | const QQmlRefPointer< QQmlContextData > & | qmlContext, |
String * | name, | ||
Flags | flags, | ||
bool * | hasProperty = nullptr |
||
) | const |
Referenced by QV4::QQmlContextWrapper::getPropertyAndBase(), QV4::QQmlContextWrapper::lookupInParentContextHierarchy(), virtualGet(), QV4::QQmlTypeWrapper::virtualGet(), and virtualGetOwnProperty().
|
static |
|
static |
Definition at line 221 of file qv4qobjectwrapper.cpp.
References engine, and QStringLiteral.
Referenced by QV4::ExecutionEngine::ExecutionEngine().
|
static |
Definition at line 1021 of file qv4qobjectwrapper.cpp.
References engine.
Referenced by QQmlPrivate::AOTCompiledContext::initLoadAttachedLookup(), QQmlPrivate::AOTCompiledContext::loadAttachedLookup(), and QQmlPrivate::AOTCompiledContext::lookupResultMetaType().
|
static |
Referenced by QV4::Lookup::getterQObjectMethod(), QV4::QQmlContextWrapper::lookupContextObjectMethod(), QV4::QQmlContextWrapper::lookupScopeObjectMethod(), and QV4::QQmlTypeWrapper::lookupSingletonMethod().
|
inline |
Definition at line 303 of file qv4qobjectwrapper_p.h.
References QV4::canConvert(), QQmlRefPointer< T >::data(), QV4::Managed::engine(), QQmlData::get(), getProperty(), QV4::Lookup::ic, method, QV4::Lookup::method, o, QV4::Heap::QObjectWrapper::object(), property, QV4::Lookup::propertyCache, QQmlData::propertyCache, QV4::Lookup::propertyData, QV4::Lookup::qobjectMethodLookup, QV4::Encode::undefined(), and QQmlData::wasDeleted().
|
static |
Referenced by QV4::Lookup::getterQObject(), QV4::QQmlContextWrapper::lookupContextObjectProperty(), QV4::QQmlContextWrapper::lookupScopeObjectProperty(), and QV4::QQmlTypeWrapper::lookupSingletonProperty().
|
inline |
Definition at line 265 of file qv4qobjectwrapper_p.h.
References AllowOverride, QV4::canConvert(), QQmlRefPointer< T >::data(), QV4::Managed::engine(), QQmlData::get(), getProperty(), QV4::Lookup::ic, o, QV4::Heap::QObjectWrapper::object(), property, QV4::Lookup::propertyCache, QQmlData::propertyCache, QV4::Lookup::propertyData, QV4::Lookup::qobjectLookup, QV4::Encode::undefined(), and QQmlData::wasDeleted().
Definition at line 740 of file qv4qobjectwrapper.cpp.
References engine, QV4::MarkStack::engine(), QQmlData::get(), QQmlData::hasConstWrapper, QQmlData::hasTaintedV4Object, QQmlData::jsEngineId, QQmlData::jsWrapper, QV4::WeakValue::markOnce(), Q_ASSERT, and QQmlData::wasDeleted().
Referenced by QV4::Heap::QQuickItemWrapper::markObjects(), and QV4::Heap::QSSGItemWrapper::markObjects().
|
inline |
Definition at line 144 of file qv4qobjectwrapper_p.h.
References o.
|
staticprotected |
Definition at line 1193 of file qv4qobjectwrapper.cpp.
References Qt::AutoConnection, QObjectPrivate::connect(), QQmlRefPointer< T >::data(), QV4::Scope::engine, QV4::extractQtSignal(), QQmlPropertyPrivate::flushSignal(), QV4::QObjectSlotDispatcher::function, QQmlData::get(), QQmlData::propertyCache, qCInfo, RETURN_UNDEFINED, QV4::PersistentValue::set(), QMetaMethod::Signal, QV4::QObjectSlotDispatcher::signal, signalIndex, QV4::QObjectSlotDispatcher::thisObject, and THROW_GENERIC_ERROR.
|
staticprotected |
Definition at line 1255 of file qv4qobjectwrapper.cpp.
References QObjectPrivate::disconnect(), QV4::Scope::engine, QV4::extractQtSignal(), QV4::Value::isObject(), QV4::StaticValue::isUndefined(), metaObject(), method, QV4::ScopedValue::ptr, QV4::Scoped< T >::ptr, RETURN_UNDEFINED, QMetaMethod::Signal, signalIndex, and THROW_GENERIC_ERROR.
|
inline |
Definition at line 151 of file qv4qobjectwrapper_p.h.
References d.
Referenced by QtObject::create(), instanceOfQObject(), QV4::PropertyListPrototype::method_splice(), QV4::QObjectWrapperOwnPropertyKeyIterator::next(), QV4::ModelObject::virtualGet(), virtualGetOwnProperty(), virtualIsEqualTo(), virtualPut(), QV4::ModelObject::virtualPut(), and virtualResolveLookupGetter().
|
static |
Definition at line 1044 of file qv4qobjectwrapper.cpp.
References engine, QString::fromUtf8(), QJSEngine::fromVariant(), QString::isEmpty(), metaObject(), method, QMetaType::name(), and QString::number().
void QV4::QObjectWrapper::setProperty | ( | ExecutionEngine * | engine, |
int | propertyIndex, | ||
const Value & | value | ||
) |
Definition at line 760 of file qv4qobjectwrapper.cpp.
References d, engine, and setProperty().
|
static |
Definition at line 469 of file qv4qobjectwrapper.cpp.
References arg, QMetaObject::BindableProperty, QQmlPropertyPrivate::binding(), QV4::ExecutionEngine::callingQmlContext(), QQmlBinding::create(), QQmlPropertyBinding::create(), QQmlPropertyBinding::createFromBoundFunction(), QQmlRefPointer< T >::data(), engine, QV4::Scope::engine, error, QQmlPropertyPrivate::findAliasTarget(), QMetaType::flags(), QJSValuePrivate::fromReturnedValue(), QMetaType::fromType(), QString::fromUtf8(), QQmlVMEMetaObject::get(), QQmlData::get(), QQmlScriptStringPrivate::isNumberLiteral, QMetaType::IsQmlList, QQmlScriptStringPrivate::isStringLiteral, QQmlPropertyData::isVarProperty(), QMetaObject::metacall(), QMetaType::name(), QQmlScriptStringPrivate::numberValue, ok, QQmlPropertyCache::property(), property, PROPERTY_STORE, QQmlData::propertyCache, QQmlAbstractBinding::PropertyToPropertyBinding, QQmlPropertyData::propType(), Q_ASSERT, Q_UNLIKELY, qCInfo, QQmlAbstractBinding::QmlBinding, qPrintable, QStringLiteral, QQmlPropertyPrivate::removeBinding(), QMetaObject::ResetProperty, QQmlScriptStringPrivate::script, QUntypedBindable::setBinding(), QQmlPropertyPrivate::setBinding(), QQmlBinding::setBoundFunction(), QQmlBinding::setSourceLocation(), QQmlAbstractBinding::setTarget(), QQmlVMEMetaObject::setVMEProperty(), QV4::ExecutionEngine::throwError(), QJsonValue::Undefined, QMetaType::UnknownType, QQmlAbstractBinding::ValueTypeProxy, and QQmlPropertyPrivate::write().
|
static |
Definition at line 765 of file qv4qobjectwrapper.cpp.
References engine, QQmlData::get(), property, QQmlData::propertyCache, Q_ASSERT, setProperty(), and QQmlData::wasDeleted().
Referenced by tryConvertAndAssign().
|
static |
Definition at line 447 of file qv4qobjectwrapper.cpp.
References engine, QQmlData::get(), QQmlPropertyCache::property(), QQmlData::propertyCache, qmlContext(), setProperty(), and QQmlData::wasDeleted().
Referenced by QV4::QQmlContextWrapper::virtualPut(), and QV4::QQmlTypeWrapper::virtualPut().
|
staticprotected |
Definition at line 805 of file qv4qobjectwrapper.cpp.
References QV4::ExecutionEngine::callingQmlContext(), QV4::Managed::engine(), getQmlProperty(), and qmlContext().
|
staticprotected |
Definition at line 854 of file qv4qobjectwrapper.cpp.
References QV4::Attr_Data, QV4::ExecutionEngine::callingQmlContext(), QV4::Scope::engine, findProperty(), getQmlProperty(), QV4::ExecutionEngine::id_destroy(), QV4::ExecutionEngine::id_toString(), object(), qmlContext(), and QQmlData::wasDeleted().
Definition at line 782 of file qv4qobjectwrapper.cpp.
References QV4::Value::as(), object(), and Q_ASSERT.
|
static |
Definition at line 1033 of file qv4qobjectwrapper.cpp.
References QMetaObject::metacall(), Q_ASSERT, and wrapper().
|
static |
Definition at line 954 of file qv4qobjectwrapper.cpp.
|
staticprotected |
Definition at line 817 of file qv4qobjectwrapper.cpp.
References QV4::ExecutionEngine::callingQmlContext(), QQmlData::context, QV4::Scope::engine, error, QQmlData::get(), QV4::Scope::hasException(), QV4::Managed::internalClass(), QV4::Heap::InternalClass::isFrozen(), object(), qmlContext(), QV4::ExecutionEngine::throwError(), and QQmlData::wasDeleted().
|
static |
Definition at line 960 of file qv4qobjectwrapper.cpp.
References engine, QV4::Lookup::forCall, QQmlData::get(), QV4::getDestroyOrToStringMethod(), QV4::getPropertyFromImports(), QV4::Lookup::getter, method, QV4::Lookup::nameIndex, object(), QQmlPropertyCache::property(), property, QQmlData::propertyCache, qmlContext(), QV4::setupQObjectLookup(), QV4::setupQObjectMethodLookup(), and QQmlData::wasDeleted().
|
static |
Definition at line 1027 of file qv4qobjectwrapper.cpp.
References engine.
|
inlinestatic |
Definition at line 231 of file qv4qobjectwrapper_p.h.
References engine, QQmlData::get(), QV4::Encode::null(), Q_LIKELY, Q_UNLIKELY, and QQmlData::wasDeleted().
Referenced by QV4::ExecutionEngine::callInContext(), QQmlPrivate::AOTCompiledContext::callObjectPropertyLookup(), callWithContextObject(), callWithScopeObject(), QQuickWindowQmlImpl::classBegin(), QV4::convertAndCall(), QQmlDelegateModelGroup::create(), QV4::ExecutionEngine::createQtObject(), QQmlVMEMetaObject::ensureQObjectWrapper(), QQmlJavaScriptExpression::evaluate(), QV4::ExecutionEngine::fromData(), QQmlDelegateModelItem::get(), QQmlListModel::get(), QV4::QQmlContextWrapper::getPropertyAndBase(), QQuickViewPrivate::init(), QQuickStackElement::initialize(), QQmlComponentPrivate::initializeObjectWithInitialProperties(), QV4::QQmlContextWrapper::lookupIdObject(), QV4::QQmlContextWrapper::lookupInParentContextHierarchy(), QV4::QQmlTypeWrapper::lookupSingletonMethod(), QV4::QQmlTypeWrapper::lookupSingletonProperty(), QQuickJSContext2DPrototype::method_get_canvas(), QV4::QmlIncubatorObject::method_get_object(), QV4::PropertyListPrototype::method_pop(), QV4::PropertyListPrototype::method_shift(), QV4::PropertyListPrototype::method_sort(), QV4::PropertyListPrototype::method_splice(), QJSEngine::newQObject(), QmlListWrapperOwnPropertyKeyIterator::next(), QQuickStackView::pop(), QQuickStackView::push(), QQuickStackView::replace(), JavaScriptJob::run(), searchContextProperties(), QQmlComponentPrivate::setInitialProperty(), QV4::QmlIncubatorObject::setInitialState(), QV4::QmlIncubatorObject::statusChanged(), QV4::CppStackFrame::thisObject(), QQuickCanvasItem::updatePolish(), QV4::QmlListWrapper::virtualGet(), QV4::QQmlTypeWrapper::virtualOwnPropertyKeys(), QV4::QQmlTypeWrapper::virtualResolveLookupGetter(), and QQmlVMEMetaObject::writeProperty().
|
inlinestatic |
Definition at line 246 of file qv4qobjectwrapper_p.h.
References QV4::Managed::engine(), QV4::Encode::null(), Q_UNLIKELY, and QQmlData::wasDeleted().
Referenced by QV4::ExecutionEngine::fromData().