Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qv4qobjectwrapper_p.h>
Public Types | |
enum | Flag { NoFlag = 0x0 , CheckRevision = 0x1 , AttachMethods = 0x2 , AllowOverride = 0x4 , IncludeImports = 0x8 } |
Public Types inherited from QV4::Object | |
enum | { NInlineProperties = 2 } |
enum | { IsObject = true , GetterOffset = 0 , SetterOffset = 1 } |
enum | ThrowOnFailure { DoThrowOnRejection , DoNotThrow } |
Public Types inherited from QV4::Managed | |
enum | { IsExecutionContext = false , IsString = false , IsStringOrSymbol = false , IsObject = false , IsTailCallable = 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 } |
Public Types inherited from QV4::Value | |
using | ManagedPtr = Managed * |
Public Types inherited from QV4::StaticValue | |
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 118 of file qv4qobjectwrapper_p.h.
Enumerator | |
---|---|
NoFlag | |
CheckRevision | |
AttachMethods | |
AllowOverride | |
IncludeImports |
Definition at line 123 of file qv4qobjectwrapper_p.h.
|
staticprotected |
Definition at line 917 of file qv4qobjectwrapper.cpp.
References args, cache, engine, and QQmlData::ensurePropertyCache().
void QV4::QObjectWrapper::destroyObject | ( | bool | lastCall | ) |
Definition at line 1518 of file qv4qobjectwrapper.cpp.
References d, QQmlData::get(), QQmlData::No, o, Q_ASSERT, and qDeleteAll().
|
static |
If an QObjectWrapper is created via wrap, then it needs to be stored somewhere. Otherwise, the garbage collector will immediately collect it if it is already past the "mark QObjectWrapper's" phase (note that QObjectWrapper are marked by iterating over a list of all QObjectWrapper, and then checking if the wrapper fulfills some conditions). However, sometimes we don't really want to keep a reference to the wrapper, but just want to make sure that it exists (and we know that the wrapper already fulfills the conditions to be kept alive). Then ensureWrapper can be used, which creates the wrapper and ensures that it is also marked.
Definition at line 583 of file qv4qobjectwrapper.cpp.
References engine, QV4::WriteBarrier::markCustom(), wrap(), and wrapper().
Referenced by QQuickWindowQmlImpl::classBegin(), QQmlVMEMetaObject::ensureQObjectWrapper(), and QQuickViewPrivate::init().
|
protected |
Definition at line 329 of file qv4qobjectwrapper.cpp.
References d, and qmlContext().
|
staticprotected |
Definition at line 336 of file qv4qobjectwrapper.cpp.
References QQmlData::get(), o, QQmlPropertyCache::property(), Q_UNUSED, and qmlContext().
|
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 351 of file qv4qobjectwrapper.cpp.
References QQmlPropertyCapture::captureProperty(), engine, QQmlPropertyCapture::expression, QQmlData::flushPendingBinding(), QQmlVMEMetaObject::get(), QQmlEnginePrivate::get(), QV4::loadProperty(), QQmlJavaScriptExpression::mustCaptureBindableProperty(), property, QQmlEnginePrivate::propertyCapture, Q_ASSERT, and wrapper().
ReturnedValue QV4::QObjectWrapper::getQmlProperty | ( | const QQmlRefPointer< QQmlContextData > & | qmlContext, |
String * | name, | ||
Flags | flags, | ||
bool * | hasProperty = nullptr ) const |
Referenced by QV4::QQmlContextWrapper::getPropertyAndBase(), QV4::QQmlContextWrapper::lookupInParentContextHierarchy(), and QV4::QQmlTypeWrapper::virtualGet().
|
static |
|
static |
Definition at line 323 of file qv4qobjectwrapper.cpp.
References engine, and QStringLiteral.
Referenced by QV4::ExecutionEngine::ExecutionEngine().
|
static |
Definition at line 1145 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 297 of file qv4qobjectwrapper_p.h.
References QV4::canConvert(), engine, QQmlData::get(), method, o, QV4::Heap::QObjectWrapper::object(), property, 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 259 of file qv4qobjectwrapper_p.h.
References QV4::canConvert(), engine, QQmlData::get(), o, QV4::Heap::QObjectWrapper::object(), property, QV4::Lookup::qobjectLookup, QV4::Encode::undefined(), and QQmlData::wasDeleted().
Definition at line 863 of file qv4qobjectwrapper.cpp.
References engine, QV4::MarkStack::engine(), QQmlData::get(), Q_ASSERT, and QQmlData::wasDeleted().
Referenced by QV4::Heap::QQuickItemWrapper::markObjects(), and QV4::Heap::QSSGItemWrapper::markObjects().
|
inline |
Definition at line 135 of file qv4qobjectwrapper_p.h.
References o.
|
staticprotected |
Definition at line 1319 of file qv4qobjectwrapper.cpp.
References Qt::AutoConnection, QObjectPrivate::connect(), QV4::Scope::engine, QV4::extractQtSignal(), QQmlPropertyPrivate::flushSignal(), QV4::QObjectSlotDispatcher::function, QQmlData::get(), qCInfo, RETURN_UNDEFINED, QV4::PersistentValue::set(), QMetaMethod::Signal, QV4::QObjectSlotDispatcher::signal, signalIndex, QV4::QObjectSlotDispatcher::thisObject, and THROW_GENERIC_ERROR.
|
staticprotected |
Definition at line 1390 of file qv4qobjectwrapper.cpp.
References QObjectPrivate::disconnect(), QV4::Scope::engine, QV4::extractQtSignal(), metaObject(), method, RETURN_UNDEFINED, QMetaMethod::Signal, signalIndex, and THROW_GENERIC_ERROR.
|
inline |
Definition at line 142 of file qv4qobjectwrapper_p.h.
References d.
Referenced by QtObject::create(), QV4::PropertyListPrototype::method_splice(), QQmlVMEMetaObject::readPropertyAsQObject(), virtualIsEqualTo(), and virtualResolveLookupGetter().
|
static |
Definition at line 1168 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 883 of file qv4qobjectwrapper.cpp.
References d, engine, and setProperty.
|
static |
Definition at line 592 of file qv4qobjectwrapper.cpp.
References arg, QMetaObject::BindableProperty, QQmlPropertyPrivate::binding(), QV4::ExecutionEngine::callingQmlContext(), QQmlBinding::create(), QQmlPropertyBinding::create(), QQmlPropertyBinding::createFromBoundFunction(), engine, QV4::Scope::engine, error, QQmlPropertyPrivate::findAliasTarget(), QMetaType::flags(), QJSValuePrivate::fromReturnedValue(), QMetaType::fromType(), QString::fromUtf8(), QQmlVMEMetaObject::get(), QQmlData::get(), QMetaType::IsQmlList, QQmlPropertyData::isVarProperty(), QMetaObject::metacall(), QMetaType::name(), ok, property, PROPERTY_STORE, QQmlAbstractBinding::PropertyToPropertyBinding, QQmlPropertyData::propType(), Q_ASSERT, Q_UNLIKELY, qCInfo, QQmlAbstractBinding::QmlBinding, qPrintable, QStringLiteral, QQmlPropertyPrivate::removeBinding(), QMetaObject::ResetProperty, QUntypedBindable::setBinding(), QQmlPropertyPrivate::setBinding(), QQmlBinding::setBoundFunction(), QQmlBinding::setSourceLocation(), QQmlAbstractBinding::setTarget(), QV4::ExecutionEngine::throwError(), QJsonValue::Undefined, QMetaType::UnknownType, QQmlAbstractBinding::ValueTypeProxy, and QQmlPropertyPrivate::write().
|
static |
Definition at line 888 of file qv4qobjectwrapper.cpp.
References engine, QQmlData::get(), property, Q_ASSERT, setProperty, and QQmlData::wasDeleted().
Referenced by tryConvertAndAssign().
|
static |
Definition at line 548 of file qv4qobjectwrapper.cpp.
References engine, QQmlData::get(), QQmlPropertyCache::property(), qmlContext(), setProperty, and QQmlData::wasDeleted().
Referenced by QV4::QQmlContextWrapper::virtualPut(), and QV4::QQmlTypeWrapper::virtualPut().
|
staticprotected |
Definition at line 928 of file qv4qobjectwrapper.cpp.
References QQmlContext::engine(), and qmlContext().
|
staticprotected |
Definition at line 977 of file qv4qobjectwrapper.cpp.
References QV4::Attr_Data, QV4::ExecutionEngine::callingQmlContext(), QV4::Scope::engine, QV4::ExecutionEngine::id_destroy(), QV4::ExecutionEngine::id_toString(), qmlContext(), and QQmlData::wasDeleted().
Definition at line 905 of file qv4qobjectwrapper.cpp.
References QV4::Value::as(), object(), and Q_ASSERT.
|
static |
Definition at line 1157 of file qv4qobjectwrapper.cpp.
References QV4::Value::as(), QMetaObject::metacall(), Q_ASSERT, and wrapper().
|
static |
Definition at line 1077 of file qv4qobjectwrapper.cpp.
|
staticprotected |
Definition at line 940 of file qv4qobjectwrapper.cpp.
References QV4::ExecutionEngine::callingQmlContext(), QV4::Scope::engine, error, QQmlData::get(), QV4::Scope::hasException(), qmlContext(), QV4::ExecutionEngine::throwError(), and QQmlData::wasDeleted().
|
static |
Definition at line 1083 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, qmlContext(), QV4::setupQObjectLookup(), QV4::setupQObjectMethodLookup(), and QQmlData::wasDeleted().
|
static |
Definition at line 1151 of file qv4qobjectwrapper.cpp.
References engine.
|
inlinestatic |
Definition at line 225 of file qv4qobjectwrapper_p.h.
References engine, QQmlData::get(), QV4::Encode::null(), Q_LIKELY, Q_UNLIKELY, and QQmlData::wasDeleted().
Referenced by QQmlVMEResolvedList::append(), appendWrapped(), QV4::ExecutionEngine::callInContext(), QQmlPrivate::AOTCompiledContext::callObjectPropertyLookup(), callWithContextObject(), callWithScopeObject(), QV4::convertAndCall(), QQmlDelegateModelGroup::create(), QV4::ExecutionEngine::createQtObject(), ensureWrapper(), QQmlJavaScriptExpression::evaluate(), QV4::ExecutionEngine::fromData(), QQmlDelegateModelItem::get(), QQmlListModel::get(), QV4::QQmlContextWrapper::getPropertyAndBase(), 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(), QQmlVMEResolvedList::replace(), replaceWrapped(), JavaScriptJob::run(), searchContextProperties(), QQmlComponentPrivate::setInitialProperty(), QV4::QmlIncubatorObject::setInitialState(), QV4::QmlIncubatorObject::statusChanged(), QV4::CppStackFrame::thisObject(), ObjectInCreationGCAnchorList::trackObject(), QQuickCanvasItem::updatePolish(), QV4::QmlListWrapper::virtualGet(), QV4::QQmlTypeWrapper::virtualOwnPropertyKeys(), QV4::QQmlTypeWrapper::virtualResolveLookupGetter(), and QQmlVMEMetaObject::writeProperty().
|
inlinestatic |
Definition at line 240 of file qv4qobjectwrapper_p.h.
References engine, QV4::Encode::null(), Q_UNLIKELY, and QQmlData::wasDeleted().
Referenced by QV4::ExecutionEngine::fromData().