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>.
Loading...
Searching...
No Matches
qqmlproperty.cpp File Reference

(e3f593da8e97fd28c887d4e26d22f9417f82a13e)

#include "qqmlproperty.h"
#include <private/qjsvalue_p.h>
#include <private/qmetaobject_p.h>
#include <private/qproperty_p.h>
#include <private/qqmlboundsignal_p.h>
#include <private/qqmlbuiltinfunctions_p.h>
#include <private/qqmldata_p.h>
#include <private/qqmlengine_p.h>
#include <private/qqmlirbuilder_p.h>
#include <private/qqmllist_p.h>
#include <private/qqmlproperty_p.h>
#include <private/qqmlsignalnames_p.h>
#include <private/qqmlstringconverters_p.h>
#include <private/qqmlvaluetypeproxybinding_p.h>
#include <private/qqmlvaluetypewrapper_p.h>
#include <private/qqmlvmemetaobject_p.h>
#include <private/qv4functionobject_p.h>
#include <private/qv4qobjectwrapper_p.h>
#include <QtQml/qqmlcontext.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlpropertymap.h>
#include <QtCore/qdebug.h>
#include <QtCore/qsequentialiterable.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qvector.h>
#include <cmath>
#include "moc_qqmlproperty.cpp"
+ Include dependency graph for qqmlproperty.cpp:

Go to the source code of this file.

Classes

struct  BindingFixer
 
struct  ConvertAndAssignResult
 

Functions

QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION (compatResolveUrlsOnAssigment, QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT)
 
static void removeOldBinding (QObject *object, QQmlPropertyIndex index, QQmlPropertyPrivate::BindingFlags flags=QQmlPropertyPrivate::None)
 
static void removeValuePropertyBinding (QObject *object, const QQmlPropertyData &core, const QQmlPropertyData &valueTypeData, QQmlPropertyData::WriteFlags flags)
 
template<typename Op >
bool changePropertyAndWriteBack (QObject *object, int coreIndex, QQmlGadgetPtrWrapper *wrapper, QQmlPropertyData::WriteFlags flags, int internalIndex, Op op)
 
template<typename Op >
bool changeThroughGadgetPtrWrapper (QObject *object, const QQmlPropertyData &core, const QQmlRefPointer< QQmlContextData > &context, QQmlPropertyData::WriteFlags flags, int internalIndex, Op op)
 
static ConvertAndAssignResult tryConvertAndAssign (QObject *object, const QQmlPropertyData &property, const QVariant &value, QQmlPropertyData::WriteFlags flags, QMetaType propertyMetaType, QMetaType variantMetaType, bool isUrl)
 
template<typename Op >
bool iterateQObjectContainer (QMetaType metaType, const void *data, Op op)
 
static void flush_vme_signal (const QObject *object, int index, bool indexInSignalRange)
 

Function Documentation

◆ changePropertyAndWriteBack()

template<typename Op >
bool changePropertyAndWriteBack ( QObject * object,
int coreIndex,
QQmlGadgetPtrWrapper * wrapper,
QQmlPropertyData::WriteFlags flags,
int internalIndex,
Op op )

Definition at line 1261 of file qqmlproperty.cpp.

References wrapper().

Referenced by changeThroughGadgetPtrWrapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ changeThroughGadgetPtrWrapper()

template<typename Op >
bool changeThroughGadgetPtrWrapper ( QObject * object,
const QQmlPropertyData & core,
const QQmlRefPointer< QQmlContextData > & context,
QQmlPropertyData::WriteFlags flags,
int internalIndex,
Op op )

Definition at line 1272 of file qqmlproperty.cpp.

References changePropertyAndWriteBack(), context, QQmlPropertyData::coreIndex(), QQmlGadgetPtrWrapper::instance(), QQmlPropertyData::propType(), QQmlMetaType::valueType(), and wrapper().

Referenced by QQmlPropertyPrivate::resetValueProperty(), and QQmlPropertyPrivate::writeValueProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DEFINE_BOOL_CONFIG_OPTION()

QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION ( compatResolveUrlsOnAssigment ,
QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT  )

◆ flush_vme_signal()

static void flush_vme_signal ( const QObject * object,
int index,
bool indexInSignalRange )
inlinestatic

If indexInSignalRange is true, index is treated as a signal index (see QObjectPrivate::signalIndex()), otherwise it is treated as a method index (QMetaMethod::methodIndex()).

Definition at line 1986 of file qqmlproperty.cpp.

References QQmlData::get(), QQmlVMEMetaObject::getForMethod(), QQmlVMEMetaObject::getForSignal(), and property.

Referenced by QQmlPropertyPrivate::connect(), and QQmlPropertyPrivate::flushSignal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ iterateQObjectContainer()

template<typename Op >
bool iterateQObjectContainer ( QMetaType metaType,
const void * data,
Op op )

Definition at line 1445 of file qqmlproperty.cpp.

References QMetaContainer::advanceConstIterator(), QMetaSequence::canGetValueAtConstIterator(), QMetaContainer::compareConstIterator(), QMetaContainer::constBegin(), QMetaContainer::constEnd(), QMetaType::convert(), QMetaContainer::destroyConstIterator(), QMetaContainer::hasConstIterator(), it, o, QMetaType::PointerToQObject, and QMetaSequence::valueAtConstIterator().

Referenced by QQmlPropertyPrivate::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeOldBinding()

static void removeOldBinding ( QObject * object,
QQmlPropertyIndex index,
QQmlPropertyPrivate::BindingFlags flags = QQmlPropertyPrivate::None )
static

Definition at line 832 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::DontEnable, QQmlData::get(), QQmlAbstractBinding::nextBinding(), QQmlValueTypeProxyBinding::setEnabled(), and QQmlAbstractBinding::ValueTypeProxy.

Referenced by QQmlPropertyPrivate::removeBinding(), and QQmlPropertyPrivate::setBinding().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeValuePropertyBinding()

static void removeValuePropertyBinding ( QObject * object,
const QQmlPropertyData & core,
const QQmlPropertyData & valueTypeData,
QQmlPropertyData::WriteFlags flags )
static

Definition at line 1249 of file qqmlproperty.cpp.

References QQmlPropertyData::DontRemoveBinding, QQmlPropertyPrivate::encodedIndex(), and QQmlPropertyPrivate::removeBinding().

Referenced by QQmlPropertyPrivate::resetValueProperty(), and QQmlPropertyPrivate::writeValueProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tryConvertAndAssign()

static ConvertAndAssignResult tryConvertAndAssign ( QObject * object,
const QQmlPropertyData & property,
const QVariant & value,
QQmlPropertyData::WriteFlags flags,
QMetaType propertyMetaType,
QMetaType variantMetaType,
bool isUrl )
static

Definition at line 1364 of file qqmlproperty.cpp.

References QMetaType::convert(), QQmlValueTypeProvider::createValueType(), d, QVariant::data(), QMetaType::fromType(), i, QMetaType::id(), QVariant::isValid(), ok, property, and QV4::QObjectWrapper::setProperty().

Referenced by QQmlPropertyPrivate::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: