Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmlproperty.cpp File Reference
#include "qqmlproperty.h"
#include "qqmlproperty_p.h"
#include "qqmlboundsignal_p.h"
#include "qqmlcontext.h"
#include "qqmlengine.h"
#include "qqmlengine_p.h"
#include "qqmldata_p.h"
#include "qqmlstringconverters_p.h"
#include "qqmlvmemetaobject_p.h"
#include "qqmlvaluetypeproxybinding_p.h"
#include <private/qjsvalue_p.h>
#include <private/qv4functionobject_p.h>
#include <private/qv4qobjectwrapper_p.h>
#include <private/qqmlbuiltinfunctions_p.h>
#include <private/qqmlirbuilder_p.h>
#include <QtQml/private/qqmllist_p.h>
#include <QStringList>
#include <QVector>
#include <private/qmetaobject_p.h>
#include <private/qqmlvaluetypewrapper_p.h>
#include <QtCore/qdebug.h>
#include <cmath>
#include <QtQml/QQmlPropertyMap>
#include <QtCore/private/qproperty_p.h>
#include <QtCore/qsequentialiterable.h>
#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 1987 of file qqmlproperty.cpp.

References QQmlVMEMetaObject::connectAliasSignal(), 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(), QIterable< Container >::constIterable(), QMetaType::convert(), QMetaContainer::destroyConstIterator(), QMetaType::flags(), QMetaContainer::hasConstIterator(), it, QIterable< Container >::metaContainer(), o, QMetaType::PointerToQObject, QMetaSequence::valueAtConstIterator(), and QSequentialIterable::valueMetaType().

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 QQmlPropertyIndex::coreIndex(), QExplicitlySharedDataPointer< T >::data(), QQmlPropertyPrivate::DontEnable, QQmlData::get(), QQmlPropertyIndex::hasValueTypeIndex(), QQmlAbstractBinding::kind(), QQmlAbstractBinding::nextBinding(), QQmlAbstractBinding::setEnabled(), QQmlAbstractBinding::targetPropertyIndex(), 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: