![]() |
Qt 6.x
The Qt SDK
|
#include <qqmlpropertycache_p.h>
Classes | |
struct | ConstPtr |
Public Types | |
using | Ptr = QQmlRefPointer< QQmlPropertyCache > |
Static Public Member Functions | |
static Ptr | createStandalone (const QMetaObject *, QTypeRevision metaObjectRevision=QTypeRevision::zero()) |
Creates a standalone QQmlPropertyCache of metaObject. | |
static const QQmlPropertyData * | property (QObject *, QStringView, const QQmlRefPointer< QQmlContextData > &, QQmlPropertyData *) |
static const QQmlPropertyData * | property (QObject *, const QLatin1String &, const QQmlRefPointer< QQmlContextData > &, QQmlPropertyData *) |
static const QQmlPropertyData * | property (QObject *, const QV4::String *, const QQmlRefPointer< QQmlContextData > &, QQmlPropertyData *) |
static int | originalClone (const QObject *, int index) |
static QString | signalParameterStringForJS (QV4::ExecutionEngine *engine, const QList< QByteArray > ¶meterNameList, QString *errorString=nullptr) |
static bool | determineMetaObjectSizes (const QMetaObject &mo, int *fieldCount, int *stringCount) |
static bool | addToHash (QCryptographicHash &hash, const QMetaObject &mo) |
Friends | |
class | QQmlEnginePrivate |
class | QQmlCompiler |
template<typename T > | |
class | QQmlPropertyCacheCreator |
template<typename T > | |
class | QQmlPropertyCacheAliasCreator |
template<typename T > | |
class | QQmlComponentAndAliasResolver |
class | QQmlMetaObject |
Additional Inherited Members | |
![]() | |
~QQmlRefCounted () | |
Definition at line 119 of file qqmlpropertycache_p.h.
Definition at line 123 of file qqmlpropertycache_p.h.
|
default |
QQmlPropertyCache::~QQmlPropertyCache | ( | ) |
Definition at line 147 of file qqmlpropertycache.cpp.
References args, QLinkedStringHash< T >::clear(), and next.
|
static |
Definition at line 1209 of file qqmlpropertycache.cpp.
References determineMetaObjectSizes(), hash, i, mo, and stringData().
Referenced by checksum().
|
inline |
Definition at line 228 of file qqmlpropertycache_p.h.
void QQmlPropertyCache::appendEnum | ( | const QString & | name, |
const QVector< QQmlEnumValue > & | values | ||
) |
Definition at line 287 of file qqmlpropertycache.cpp.
void QQmlPropertyCache::appendMethod | ( | const QString & | name, |
QQmlPropertyData::Flags | flags, | ||
int | coreIndex, | ||
QMetaType | returnType, | ||
const QList< QByteArray > & | names, | ||
const QVector< QMetaType > & | parameterTypes | ||
) |
Definition at line 260 of file qqmlpropertycache.cpp.
References QList< T >::append(), args, QList< T >::at(), QList< T >::data(), methodOffset(), and QList< T >::size().
void QQmlPropertyCache::appendProperty | ( | const QString & | name, |
QQmlPropertyData::Flags | flags, | ||
int | coreIndex, | ||
QMetaType | propType, | ||
QTypeRevision | version, | ||
int | notifyIndex | ||
) |
notifyIndex MUST be in the signal index range (see QObjectPrivate::signalIndex()). This is different from QMetaMethod::methodIndex().
Definition at line 200 of file qqmlpropertycache.cpp.
References QList< T >::append(), QList< T >::data(), propertyOffset(), and QList< T >::size().
Referenced by QQmlPropertyCacheAliasCreator< ObjectContainer >::appendAliasesToPropertyCache().
void QQmlPropertyCache::appendSignal | ( | const QString & | name, |
QQmlPropertyData::Flags | flags, | ||
int | coreIndex, | ||
const QMetaType * | types = nullptr , |
||
const QList< QByteArray > & | names = QList<QByteArray>() |
||
) |
Definition at line 221 of file qqmlpropertycache.cpp.
References QList< T >::append(), args, QString::at(), QList< T >::data(), methodOffset(), QQmlPropertyData::Flags::setIsSignalHandler(), signalOffset(), QList< T >::size(), and QChar::toUpper().
Definition at line 469 of file qqmlpropertycache_p.h.
References args, QMetaObject::InvokeMetaMethod, QQmlMetaObjectPointer::metaObject(), and mo.
QByteArray QQmlPropertyCache::checksum | ( | QHash< quintptr, QByteArray > * | checksums, |
bool * | ok | ||
) | const |
Definition at line 1225 of file qqmlpropertycache.cpp.
References addToHash(), QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), hash, QHash< Key, T >::insert(), QQmlMetaObjectPointer::isShared(), it, QCryptographicHash::Md5, QQmlMetaObjectPointer::metaObject(), and ok.
const char * QQmlPropertyCache::className | ( | ) | const |
Definition at line 922 of file qqmlpropertycache.cpp.
References QByteArray::constData(), QQmlMetaObjectPointer::metaObject(), and mo.
QQmlPropertyCache::Ptr QQmlPropertyCache::copy | ( | ) | const |
Definition at line 178 of file qqmlpropertycache.cpp.
References copy().
Referenced by copy(), copyAndAppend(), and copyAndReserve().
QQmlPropertyCache::Ptr QQmlPropertyCache::copyAndAppend | ( | const QMetaObject * | metaObject, |
QTypeRevision | typeVersion, | ||
QQmlPropertyData::Flags | propertyFlags = QQmlPropertyData::Flags() , |
||
QQmlPropertyData::Flags | methodFlags = QQmlPropertyData::Flags() , |
||
QQmlPropertyData::Flags | signalFlags = QQmlPropertyData::Flags() |
||
) | const |
Definition at line 333 of file qqmlpropertycache.cpp.
References copy(), QMetaObjectPrivate::get(), metaObject(), methodCount(), propertyCount(), Q_ASSERT, and signalCount().
Referenced by createStandalone().
QQmlPropertyCache::Ptr QQmlPropertyCache::copyAndReserve | ( | int | propertyCount, |
int | methodCount, | ||
int | signalCount, | ||
int | enumCount | ||
) | const |
Definition at line 183 of file qqmlpropertycache.cpp.
References copy(), methodCount(), propertyCount(), QList< T >::reserve(), and signalCount().
const QMetaObject * QQmlPropertyCache::createMetaObject | ( | ) | const |
Definition at line 296 of file qqmlpropertycache.cpp.
References QQmlMetaObjectPointer::isNull(), QQmlMetaObjectPointer::metaObject(), QQmlMetaObjectPointer::setSharedOnce(), QMetaObjectBuilder::setSuperClass(), QMetaObjectBuilder::toMetaObject(), and toMetaObjectBuilder().
|
static |
Creates a standalone QQmlPropertyCache of metaObject.
It is separate from the usual QQmlPropertyCache hierarchy. It's parent is not equal to any other QQmlPropertyCache created from QObject::staticMetaObject, for example.
Definition at line 118 of file qqmlpropertycache.cpp.
References QQmlPropertyCache(), QQmlRefPointer< T >::adopt(), copyAndAppend(), createStandalone(), QTypeRevision::isValid(), metaObject(), Q_ASSERT, QMetaObject::superClass(), update(), and QTypeRevision::zero().
Referenced by createStandalone(), VDMAbstractItemModelDataType::initializeMetaType(), QQmlMetaTypeData::propertyCache(), QQmlOpenMetaObject::setCached(), and VDMListDelegateDataType::toDynamicMetaObject().
const QQmlPropertyData * QQmlPropertyCache::defaultProperty | ( | ) | const |
Definition at line 321 of file qqmlpropertycache.cpp.
References defaultPropertyName(), and property.
|
inline |
Definition at line 391 of file qqmlpropertycache_p.h.
Referenced by defaultProperty().
|
static |
Definition at line 1191 of file qqmlpropertycache.cpp.
References mo, QMetaObjectPrivate::OutputRevision, priv(), qMax(), and QMetaObjectPrivate::revision.
Referenced by addToHash().
|
inline |
Definition at line 324 of file qqmlpropertycache_p.h.
References QQmlRefPointer< T >::data(), QQmlMetaObjectPointer::metaObject(), and parent().
Referenced by signalParameterNames().
void QQmlPropertyCache::invalidate | ( | const QMetaObject * | metaObject | ) |
invalidates and updates the PropertyCache if the QMetaObject has changed. This function is used in the tooling to update dynamic properties.
Definition at line 573 of file qqmlpropertycache.cpp.
References QList< T >::clear(), QLinkedStringHash< T >::linkAndReserve(), metaObject(), metaObjectSignalCount(), QMetaObject::methodCount(), parent(), QMetaObject::propertyCount(), reserve(), and update().
Referenced by QQmlDesignerMetaObject::createNewDynamicProperty().
|
inline |
Definition at line 413 of file qqmlpropertycache_p.h.
References QTypeRevision::hasMajorVersion(), QTypeRevision::hasMinorVersion(), QTypeRevision::majorVersion(), QTypeRevision::minorVersion(), Q_ASSERT, QList< T >::size(), and QTypeRevision::zero().
const QQmlPropertyData * QQmlPropertyCache::maybeUnresolvedProperty | ( | int | index | ) | const |
Definition at line 308 of file qqmlpropertycache.cpp.
References QList< T >::at(), and propertyCount().
|
inline |
Definition at line 317 of file qqmlpropertycache_p.h.
References QQmlMetaObjectPointer::metaObject().
Referenced by QQmlPropertyCapture::captureProperty(), copyAndAppend(), createStandalone(), invalidate(), and update().
|
inline |
Definition at line 343 of file qqmlpropertycache_p.h.
References QList< T >::at(), and QList< T >::size().
|
inline |
Definition at line 444 of file qqmlpropertycache_p.h.
References QList< T >::size().
Referenced by copyAndAppend(), and copyAndReserve().
|
inline |
Definition at line 379 of file qqmlpropertycache_p.h.
References QList< T >::size().
|
inline |
Definition at line 449 of file qqmlpropertycache_p.h.
Referenced by appendMethod(), and appendSignal().
|
static |
Definition at line 771 of file qqmlpropertycache.cpp.
References QMetaMethod::attributes(), cache, QMetaMethod::Cloned, QQmlData::get(), QQmlPropertyData::isCloned(), and QMetaObjectPrivate::signal().
int QQmlPropertyCache::originalClone | ( | int | index | ) | const |
Definition at line 764 of file qqmlpropertycache.cpp.
References signal.
Referenced by QQmlBoundSignal::QQmlBoundSignal().
|
inline |
Definition at line 402 of file qqmlpropertycache_p.h.
References method, and property.
Referenced by toMetaObjectBuilder().
|
inline |
Definition at line 396 of file qqmlpropertycache_p.h.
Referenced by QV4::canConvert(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), firstCppMetaObject(), and invalidate().
|
inline |
Definition at line 169 of file qqmlpropertycache_p.h.
References context.
Referenced by QQmlListReference::QQmlListReference(), QV4::QObjectWrapper::findProperty(), QQmlPrivate::initObjectLookup(), QQmlPropertyPrivate::initProperty(), readObjectProperty(), QV4::QObjectWrapper::setProperty(), QV4::QObjectWrapper::setQmlProperty(), and QV4::QObjectWrapper::virtualResolveLookupGetter().
|
inline |
Definition at line 332 of file qqmlpropertycache_p.h.
References QList< T >::at(), and propertyCount().
|
static |
Definition at line 906 of file qqmlpropertycache.cpp.
References context.
|
static |
Definition at line 892 of file qqmlpropertycache.cpp.
References context.
|
static |
Definition at line 899 of file qqmlpropertycache.cpp.
References context.
|
inline |
Definition at line 434 of file qqmlpropertycache_p.h.
References QList< T >::size().
Referenced by copyAndAppend(), copyAndReserve(), maybeUnresolvedProperty(), and property().
|
inline |
Definition at line 439 of file qqmlpropertycache_p.h.
Referenced by appendProperty().
|
inline |
Definition at line 371 of file qqmlpropertycache_p.h.
|
inline |
Definition at line 464 of file qqmlpropertycache_p.h.
|
inline |
Definition at line 229 of file qqmlpropertycache_p.h.
Referenced by QQmlMetaTypeData::propertyCache().
void QQmlPropertyCache::setParent | ( | QQmlPropertyCache::ConstPtr | newParent | ) |
Definition at line 326 of file qqmlpropertycache.cpp.
|
inline |
index MUST be in the signal index range (see QObjectPrivate::signalIndex()). This is different from QMetaMethod::methodIndex().
Definition at line 358 of file qqmlpropertycache_p.h.
References QList< T >::at(), QQmlPropertyData::coreIndex(), QQmlPropertyData::isSignal(), Q_ASSERT, and QList< T >::size().
Referenced by QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject().
|
inline |
Definition at line 454 of file qqmlpropertycache_p.h.
References QList< T >::size().
Referenced by copyAndAppend(), copyAndReserve(), and QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject().
|
inline |
Definition at line 459 of file qqmlpropertycache_p.h.
Referenced by appendSignal(), and QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject().
QList< QByteArray > QQmlPropertyCache::signalParameterNames | ( | int | index | ) | const |
index MUST be in the signal index range (see QObjectPrivate::signalIndex()). This is different from QMetaMethod::methodIndex().
Definition at line 1266 of file qqmlpropertycache.cpp.
References args, QQmlPropertyData::arguments(), firstCppMetaObject(), QQmlPropertyData::hasArguments(), method, QMetaObjectPrivate::signal(), and signal.
|
static |
Definition at line 733 of file qqmlpropertycache.cpp.
References QString::arg(), QList< T >::at(), QSet< T >::contains(), QQmlRefCount::count(), engine, QString::fromUtf8(), i, QList< T >::size(), and QCoreApplication::translate().
Referenced by Q_TRACE_POINT(), and QQmlBoundSignal_callback().
void QQmlPropertyCache::toMetaObjectBuilder | ( | QMetaObjectBuilder & | builder | ) | const |
Definition at line 930 of file qqmlpropertycache.cpp.
References QMetaObjectBuilder::addClassInfo(), QMetaObjectBuilder::addEnumerator(), QMetaEnumBuilder::addKey(), QMetaObjectBuilder::addProperty(), QMetaObjectBuilder::addSignal(), QMetaObjectBuilder::addSlot(), arguments, QLinkedStringHash< T >::begin(), QQmlPropertyData::coreIndex(), QLinkedStringHash< T >::end(), QString::isEmpty(), QByteArray::isEmpty(), QQmlPropertyData::isFunction(), iter, method, methods, QCssKnownValue::name, QQmlEnumData::name, overrideData(), properties, property, QMetaMethod::Public, Q_ASSERT, qMakePair(), QMetaObjectBuilder::setClassName(), QMetaEnumBuilder::setIsScoped(), QMetaPropertyBuilder::setReadable(), QList< T >::size(), QString::toUtf8(), and QQmlEnumData::values.
Referenced by createMetaObject().
void QQmlPropertyCache::update | ( | const QMetaObject * | metaObject | ) |
Definition at line 546 of file qqmlpropertycache.cpp.
References QLinkedStringHash< T >::clear(), metaObject(), metaObjectSignalCount(), QMetaObject::methodCount(), QMetaObject::propertyCount(), Q_ASSERT, and QList< T >::reserve().
Referenced by QQmlOpenMetaObjectType::createProperties(), QQmlOpenMetaObjectType::createProperty(), createStandalone(), and invalidate().
|
friend |
Definition at line 233 of file qqmlpropertycache_p.h.
|
friend |
Definition at line 236 of file qqmlpropertycache_p.h.
|
friend |
Definition at line 232 of file qqmlpropertycache_p.h.
|
friend |
Definition at line 237 of file qqmlpropertycache_p.h.
|
friend |
Definition at line 235 of file qqmlpropertycache_p.h.
|
friend |
Definition at line 234 of file qqmlpropertycache_p.h.