![]() |
Qt 6.x
The Qt SDK
|
#include <qqmlbinding_p.h>
Inheritance diagram for QQmlBinding:
Collaboration diagram for QQmlBinding:Public Types | |
| enum | { Invalid = -1 } |
| typedef QExplicitlySharedDataPointer< QQmlBinding > | Ptr |
| typedef int | Identifier |
Public Types inherited from QQmlAbstractBinding | |
| enum | Kind { ValueTypeProxy , QmlBinding , PropertyToPropertyBinding } |
| enum | TargetTag { NoTargetTag = 0x0 , UpdatingBinding = 0x1 , BindingEnabled = 0x2 } |
| enum | NextBindingTag { NoBindingTag = 0x0 , AddedToObject = 0x1 , CanUseAccessor = 0x2 } |
| typedef QExplicitlySharedDataPointer< QQmlAbstractBinding > | Ptr |
Protected Member Functions | |
| virtual void | doUpdate (const DeleteWatcher &watcher, QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) |
| virtual bool | write (const QV4::Value &result, bool isUndefined, QQmlPropertyData::WriteFlags flags)=0 |
| virtual bool | write (void *result, QMetaType type, bool isUndefined, QQmlPropertyData::WriteFlags flags)=0 |
| int | getPropertyType () const |
| bool | slowWrite (const QQmlPropertyData &core, const QQmlPropertyData &valueTypeData, const QV4::Value &result, bool isUndefined, QQmlPropertyData::WriteFlags flags) |
| bool | slowWrite (const QQmlPropertyData &core, const QQmlPropertyData &valueTypeData, const void *result, QMetaType resultType, bool isUndefined, QQmlPropertyData::WriteFlags flags) |
| QV4::ReturnedValue | evaluate (bool *isUndefined) |
Protected Member Functions inherited from QQmlJavaScriptExpression | |
| void | createQmlBinding (const QQmlRefPointer< QQmlContextData > &ctxt, QObject *scope, const QString &code, const QString &filename, quint16 line) |
| void | setupFunction (QV4::ExecutionContext *qmlContext, QV4::Function *f) |
| void | setCompilationUnit (const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit) |
Protected Member Functions inherited from QQmlAbstractBinding | |
| QQmlAbstractBinding () | |
| void | setAddedToObject (bool v) |
| bool | isAddedToObject () const |
| void | setNextBinding (QQmlAbstractBinding *) |
| void | getPropertyData (const QQmlPropertyData **propertyData, QQmlPropertyData *valueTypeData) const |
| bool | updatingFlag () const |
| void | setUpdatingFlag (bool) |
| bool | enabledFlag () const |
| void | setEnabledFlag (bool) |
| void | updateCanUseAccessor () |
Friends | |
| class | QQmlAbstractBinding |
Additional Inherited Members | |
Public Attributes inherited from QQmlAbstractBinding | |
| RefCount | ref |
Protected Types inherited from QQmlJavaScriptExpression | |
| enum | GuardTag { NoGuardTag , NotifyOnValueChanged } |
| enum | Tag { NoTag , InEvaluationLoop } |
Protected Attributes inherited from QQmlJavaScriptExpression | |
| QBiPointer< QObject, DeleteWatcher > | m_scopeObject |
| QForwardFieldList< QQmlJavaScriptExpressionGuard, &QQmlJavaScriptExpressionGuard::next, GuardTag > | activeGuards |
| QTaggedPointer< QQmlDelayedError, Tag > | m_error |
| TriggerList * | qpropertyChangeTriggers = nullptr |
Protected Attributes inherited from QQmlAbstractBinding | |
| QQmlPropertyIndex | m_targetIndex |
| QTaggedPointer< QObject, TargetTags > | m_target |
| QTaggedPointer< QQmlAbstractBinding, NextBindingTags > | m_nextBinding |
Definition at line 32 of file qqmlbinding_p.h.
| typedef int QQmlBinding::Identifier |
Definition at line 76 of file qqmlbinding_p.h.
Definition at line 37 of file qqmlbinding_p.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Invalid | |
Definition at line 77 of file qqmlbinding_p.h.
|
override |
Definition at line 127 of file qqmlbinding.cpp.
|
static |
Definition at line 35 of file qqmlbinding.cpp.
References QQmlScriptStringPrivate::bindingId, QQmlScriptStringPrivate::context, QV4::QmlContext::create(), engine, QQmlContext::engine(), QQmlContextData::get(), QQmlEnginePrivate::get(), Invalid, QQmlContext::isValid(), QQmlScriptStringPrivate::lineNumber, property, qmlContext(), QV4::ExecutionEngine::rootContext(), QQmlScriptStringPrivate::scope, QQmlScriptStringPrivate::script, and url.
Referenced by QQuickAnchorChanges::actions(), QQuickPropertyChanges::actions(), QQuickPropertyChanges::changeExpression(), QQmlCppBinding::createBindingForNonBindable(), QQmlAnyBinding::createFromCodeString(), QQmlAnyBinding::createFromFunction(), QQmlAnyBinding::createFromScriptString(), QV4::QObjectWrapper::setProperty(), and QV4::QQmlValueTypeWrapper::virtualPut().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 89 of file qqmlbinding.cpp.
|
static |
Definition at line 104 of file qqmlbinding.cpp.
References create(), QQmlJavaScriptExpression::function(), and property.
Here is the call graph for this function:
|
static |
Definition at line 111 of file qqmlbinding.cpp.
References QQmlJavaScriptExpression::function(), and Q_ASSERT.
Here is the call graph for this function:
|
static |
Definition at line 391 of file qqmlbinding.cpp.
References QQmlJavaScriptExpression::QQmlTranslationBindingFromTranslationInfo.
|
static |
Definition at line 371 of file qqmlbinding.cpp.
References QQmlJavaScriptExpression::QQmlTranslationBindingFromBinding.
Referenced by QQuickPropertyChanges::actions(), and QQmlCppBinding::createTranslationBindingForNonBindable().
Here is the caller graph for this function:| QVector< QQmlProperty > QQmlBinding::dependencies | ( | ) | const |
This method returns a snapshot of the currently tracked dependencies of this binding. The dependencies can change upon reevaluation. This method is used in GammaRay to visualize binding hierarchies.
Call this method from the UI thread.
Definition at line 627 of file qqmlbinding.cpp.
References QQmlJavaScriptExpression::activeGuards, QTaggedPointer< T, Tag >::data(), dependencies(), QForwardFieldList< N, nextMember, Tag >::first(), QString::fromUtf8(), i, QMetaProperty::isValid(), QQmlAbstractBinding::m_target, QMetaMethod::methodIndex(), QMetaProperty::name(), QForwardFieldList< N, nextMember, Tag >::next(), TriggerList::next, QMetaObject::property(), property, QMetaObject::propertyCount(), QQmlJavaScriptExpression::qpropertyChangeTriggers, and QMetaObjectPrivate::signal().
Referenced by dependencies().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Reimplemented in QQmlTranslationBinding.
Definition at line 667 of file qqmlbinding.cpp.
References QV4::Function::AotCompiled, QV4::Function::aotCompiledFunction, QQmlJavaScriptExpression::clearError(), QTaggedPointer< T, Tag >::data(), QQmlJavaScriptExpression::delayedError(), QV4::Scope::engine, QQmlJavaScriptExpression::engine(), error, evaluate(), QQmlJavaScriptExpression::function(), QQmlEnginePrivate::get(), hasBoundFunction(), QQmlJavaScriptExpression::hasError(), QQmlAbstractBinding::isAddedToObject(), QV4::Function::kind, QQmlAbstractBinding::m_target, Q_ALLOCA_VAR, Q_LIKELY, QQmlPrivate::AOTCompiledFunction::returnType, QQmlDelayedError::setErrorLocation(), QQmlDelayedError::setErrorObject(), sourceLocation(), QV4::Encode::undefined(), watcher, and write().
Referenced by update().
Here is the call graph for this function:
Here is the caller graph for this function:| QVariant QQmlBinding::evaluate | ( | ) |
Definition at line 585 of file qqmlbinding.cpp.
References QQmlEnginePrivate::dereferenceScarceResources(), QQmlJavaScriptExpression::engine(), QQmlJavaScriptExpression::evaluate(), QMetaType::fromType(), QQmlEnginePrivate::get(), QJSEngine::handle(), qmlEngine(), QQmlEnginePrivate::referenceScarceResources(), and QV4::ExecutionEngine::toVariant().
Referenced by doUpdate(), QQmlBind::setObject(), and QQuickStateGroupPrivate::updateAutoState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 170 of file qqmlbinding.cpp.
References args, QV4::JSCallData::callData(), QList< T >::data(), QQmlJavaScriptExpression::engine(), QQmlJavaScriptExpression::evaluate(), QJSEngine::handle(), QList< T >::size(), and QV4::PersistentValue::valueRef().
Here is the call graph for this function:Definition at line 82 of file qqmlbinding_p.h.
References QQmlJavaScriptExpression::evaluate().
Here is the call graph for this function:
|
overridevirtual |
Reimplemented from QQmlAbstractBinding.
Definition at line 622 of file qqmlbinding.cpp.
References QStringLiteral.
|
overridevirtual |
Implements QQmlJavaScriptExpression.
Definition at line 601 of file qqmlbinding.cpp.
References update().
Here is the call graph for this function:
|
protected |
|
inline |
Definition at line 94 of file qqmlbinding_p.h.
Referenced by doUpdate().
Here is the caller graph for this function:
|
virtual |
Reimplemented in QQmlTranslationBinding.
Definition at line 662 of file qqmlbinding.cpp.
References QQmlJavaScriptExpression::activeGuards, QForwardFieldList< N, nextMember, Tag >::isEmpty(), and QQmlJavaScriptExpression::qpropertyChangeTriggers.
Referenced by QQmlObjectCreator::finalize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinefinalvirtual |
Implements QQmlAbstractBinding.
Definition at line 65 of file qqmlbinding_p.h.
References QQmlAbstractBinding::QmlBinding.
|
inlinefinalvirtual |
Reimplemented from QQmlJavaScriptExpression.
Definition at line 69 of file qqmlbinding_p.h.
|
overridevirtual |
Reimplemented from QQmlJavaScriptExpression.
Definition at line 606 of file qqmlbinding.cpp.
References update().
Here is the call graph for this function:
|
inline |
Definition at line 91 of file qqmlbinding_p.h.
References QV4::Managed::engine().
Referenced by QV4::QObjectWrapper::setProperty(), and QV4::QQmlValueTypeWrapper::virtualPut().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Implements QQmlAbstractBinding.
Definition at line 611 of file qqmlbinding.cpp.
References e, QQmlAbstractBinding::enabledFlag(), QQmlAbstractBinding::setEnabledFlag(), QQmlJavaScriptExpression::setNotifyOnValueChanged(), update(), and QQmlAbstractBinding::updateCanUseAccessor().
Here is the call graph for this function:| void QQmlBinding::setSourceLocation | ( | const QQmlSourceLocation & | location | ) |
Definition at line 81 of file qqmlbinding.cpp.
Referenced by QV4::QObjectWrapper::setProperty(), and QV4::QQmlValueTypeWrapper::virtualPut().
Here is the caller graph for this function:
|
protected |
Definition at line 467 of file qqmlbinding.cpp.
References QV4::Value::as(), QQmlJavaScriptExpression::context(), QQmlPropertyData::coreIndex(), QTaggedPointer< T, Tag >::data(), QQmlJavaScriptExpression::delayedError(), QMetaType::flags(), QJSValuePrivate::fromReturnedValue(), QMetaType::fromType(), QVariant::fromValue(), QQmlVMEMetaObject::get(), QQmlJavaScriptExpression::hasError(), QMetaType::id(), QQmlPropertyData::isQList(), QMetaType::IsQmlList, QQmlPropertyData::isQObject(), QQmlPropertyData::isResettable(), QQmlPropertyData::isValid(), QQmlPropertyData::isVarProperty(), QQmlAbstractBinding::m_target, QMetaType::name(), QQmlPropertyData::propType(), Q_ASSERT, QMetaType::QVariant, QQmlPropertyPrivate::resetValueProperty(), QQmlPropertyPrivate::resolveUrlsOnAssignment(), QQmlDelayedError::setErrorDescription(), QQmlVMEMetaObject::setVMEProperty(), QV4::ExecutionEngine::toVariant(), typeName, QQmlPropertyPrivate::urlSequence(), watcher, and QQmlPropertyPrivate::writeValueProperty().
Referenced by QQmlTranslationBinding::doUpdate(), GenericBinding< StaticPropType >::write(), and GenericBinding< StaticPropType >::write().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 417 of file qqmlbinding.cpp.
References args, QQmlJavaScriptExpression::context(), QQmlPropertyData::coreIndex(), QTaggedPointer< T, Tag >::data(), QQmlJavaScriptExpression::delayedError(), QQmlJavaScriptExpression::engine(), QString::fromUtf8(), QQmlVMEMetaObject::get(), QJSEngine::handle(), QQmlJavaScriptExpression::hasError(), QQmlPropertyData::isResettable(), QQmlPropertyData::isValid(), QQmlPropertyData::isVarProperty(), QQmlAbstractBinding::m_target, QMetaObject::metacall(), QV4::ExecutionEngine::metaTypeToJS(), QMetaType::name(), QQmlPropertyData::propType(), Q_ASSERT, qmlEngine(), QStringLiteral, QMetaObject::ResetProperty, QQmlDelayedError::setErrorDescription(), QQmlVMEMetaObject::setVMEProperty(), typeName, watcher, and QQmlPropertyPrivate::writeValueProperty().
Here is the call graph for this function:
|
overridevirtual |
Reimplemented from QQmlJavaScriptExpression.
Reimplemented in QQmlTranslationBindingFromBinding, and QQmlTranslationBindingFromTranslationInfo.
Definition at line 74 of file qqmlbinding.cpp.
References QQmlJavaScriptExpression::sourceLocation().
Referenced by doUpdate(), and update().
Here is the call graph for this function:
Here is the caller graph for this function:| void QQmlBinding::update | ( | QQmlPropertyData::WriteFlags | flags = QQmlPropertyData::DontRemoveBinding | ) |
Definition at line 132 of file qqmlbinding.cpp.
References QQmlPropertyData::BypassInterceptor, QQmlAbstractBinding::canUseAccessor(), QQmlSourceLocation::column, d, doUpdate(), QQmlAbstractBinding::enabledFlag(), QQmlJavaScriptExpression::engine(), QQmlJavaScriptExpression::function(), QQmlEnginePrivate::get(), QQmlAbstractBinding::getPropertyData(), QJSEngine::handle(), QQmlJavaScriptExpression::hasValidContext(), QQmlSourceLocation::line, QQmlAbstractBinding::printBindingLoopError(), Q_ASSERT, Q_TRACE_SCOPE, Q_UNLIKELY, qmlEngine(), QQmlPropertyPrivate::restore(), QQmlAbstractBinding::setUpdatingFlag(), QQmlSourceLocation::sourceFile, sourceLocation(), QQmlAbstractBinding::targetObject(), QQmlAbstractBinding::updatingFlag(), QQmlData::wasDeleted(), and watcher.
Referenced by expressionChanged(), QQmlTranslationBinding::onLanguageChange(), refresh(), and setEnabled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in GenericBinding< StaticPropType >, GenericBinding< QMetaType::QString >, and QObjectPointerBinding.
Referenced by doUpdate().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in GenericBinding< StaticPropType >, GenericBinding< QMetaType::QString >, and QObjectPointerBinding.
|
friend |
Definition at line 35 of file qqmlbinding_p.h.