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 <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 | |
Protected Member Functions inherited from QQmlRefCounted< QQmlPropertyCache > | |
~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 160 of file qqmlpropertycache.cpp.
References args, QLinkedStringHash< T >::clear(), and next.
|
static |
Definition at line 1213 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 299 of file qqmlpropertycache.cpp.
References QQmlEnumData::name.
void QQmlPropertyCache::appendMethod | ( | const QString & | name, |
QQmlPropertyData::Flags | flags, | ||
int | coreIndex, | ||
QMetaType | returnType, | ||
const QList< QByteArray > & | names, | ||
const QVector< QMetaType > & | parameterTypes ) |
Definition at line 272 of file qqmlpropertycache.cpp.
References args, methodOffset(), and QQmlPropertyData::setPropType().
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 213 of file qqmlpropertycache.cpp.
References propertyOffset(), and QQmlPropertyData::setPropType().
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 234 of file qqmlpropertycache.cpp.
References args, methodOffset(), QQmlPropertyData::Flags::setIsSignalHandler(), QQmlPropertyData::setPropType(), QQmlSignalNames::signalNameToHandlerName(), and signalOffset().
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 1229 of file qqmlpropertycache.cpp.
References addToHash(), QSet< T >::constEnd(), QSet< T >::constFind(), hash, QQmlMetaObjectPointer::isShared(), it, QCryptographicHash::Md5, QQmlMetaObjectPointer::metaObject(), ok, and QByteArray().
const char * QQmlPropertyCache::className | ( | ) | const |
Definition at line 926 of file qqmlpropertycache.cpp.
References QByteArray::constData(), QQmlMetaObjectPointer::metaObject(), and mo.
QQmlPropertyCache::Ptr QQmlPropertyCache::copy | ( | ) | const |
Definition at line 191 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 345 of file qqmlpropertycache.cpp.
References copy(), QMetaObjectPrivate::get(), metaObject(), methodCount(), propertyCount(), Q_ASSERT, and signalCount().
QQmlPropertyCache::Ptr QQmlPropertyCache::copyAndReserve | ( | int | propertyCount, |
int | methodCount, | ||
int | signalCount, | ||
int | enumCount ) const |
Definition at line 196 of file qqmlpropertycache.cpp.
References copy(), methodCount(), propertyCount(), and signalCount().
const QMetaObject * QQmlPropertyCache::createMetaObject | ( | ) | const |
Definition at line 308 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 131 of file qqmlpropertycache.cpp.
References QQmlPropertyCache(), createStandalone(), QTypeRevision::isValid(), metaObject(), Q_ASSERT, QMetaObject::superClass(), and QTypeRevision::zero().
Referenced by createStandalone(), VDMAbstractItemModelDataType::initializeMetaType(), QQmlMetaTypeData::propertyCache(), QQmlOpenMetaObject::setCached(), and VDMListDelegateDataType::toDynamicMetaObject().
const QQmlPropertyData * QQmlPropertyCache::defaultProperty | ( | ) | const |
Definition at line 333 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 1195 of file qqmlpropertycache.cpp.
References mo, QMetaObjectPrivate::OutputRevision, priv(), and qMax().
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 577 of file qqmlpropertycache.cpp.
References 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, and QTypeRevision::zero().
const QQmlPropertyData * QQmlPropertyCache::maybeUnresolvedProperty | ( | int | index | ) | const |
Definition at line 320 of file qqmlpropertycache.cpp.
References 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.
|
inline |
Definition at line 444 of file qqmlpropertycache_p.h.
Referenced by copyAndAppend(), and copyAndReserve().
|
inline |
Definition at line 379 of file qqmlpropertycache_p.h.
|
inline |
Definition at line 449 of file qqmlpropertycache_p.h.
Referenced by appendMethod(), and appendSignal().
|
static |
Definition at line 775 of file qqmlpropertycache.cpp.
References cache, QMetaMethod::Cloned, QQmlData::get(), QQmlPropertyData::isCloned(), and QMetaObjectPrivate::signal().
int QQmlPropertyCache::originalClone | ( | int | index | ) | const |
Definition at line 768 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 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::setQmlProperty(), and QV4::QObjectWrapper::virtualResolveLookupGetter().
|
inline |
Definition at line 332 of file qqmlpropertycache_p.h.
References propertyCount().
|
static |
Definition at line 910 of file qqmlpropertycache.cpp.
References context.
|
static |
Definition at line 896 of file qqmlpropertycache.cpp.
References context.
|
static |
Definition at line 903 of file qqmlpropertycache.cpp.
References context.
|
inline |
Definition at line 434 of file qqmlpropertycache_p.h.
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.
void QQmlPropertyCache::setParent | ( | QQmlPropertyCache::ConstPtr | newParent | ) |
Definition at line 338 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 Q_ASSERT.
|
inline |
Definition at line 454 of file qqmlpropertycache_p.h.
Referenced by copyAndAppend(), and copyAndReserve().
|
inline |
Definition at line 459 of file qqmlpropertycache_p.h.
Referenced by appendSignal().
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 1270 of file qqmlpropertycache.cpp.
References args, firstCppMetaObject(), method, QMetaObjectPrivate::signal(), and signal.
|
static |
Definition at line 737 of file qqmlpropertycache.cpp.
References QByteArray::at(), QQmlRefCount::count(), engine, QString::fromUtf8(), i, QString::size(), and QCoreApplication::translate().
Referenced by Q_TRACE_POINT(), and QQmlBoundSignal_callback().
void QQmlPropertyCache::toMetaObjectBuilder | ( | QMetaObjectBuilder & | builder | ) | const |
Definition at line 934 of file qqmlpropertycache.cpp.
References QMetaObjectBuilder::addClassInfo(), QMetaObjectBuilder::addEnumerator(), QMetaEnumBuilder::addKey(), QMetaObjectBuilder::addProperty(), QMetaObjectBuilder::addSignal(), QMetaObjectBuilder::addSlot(), arguments, QLinkedStringHash< T >::begin(), QLinkedStringHash< T >::end(), QByteArray::isEmpty(), QString::isEmpty(), iter, method, methods, overrideData(), properties, property, QMetaMethod::Public, Q_ASSERT, qMakePair(), QMetaObjectBuilder::setClassName(), QMetaEnumBuilder::setIsScoped(), QMetaPropertyBuilder::setReadable(), QList< T >::size(), and QString::toUtf8().
Referenced by createMetaObject().
void QQmlPropertyCache::update | ( | const QMetaObject * | metaObject | ) |
Definition at line 550 of file qqmlpropertycache.cpp.
References QLinkedStringHash< T >::clear(), metaObject(), metaObjectSignalCount(), QMetaObject::methodCount(), QMetaObject::propertyCount(), and Q_ASSERT.
Referenced by QQmlOpenMetaObjectType::createProperties(), QQmlOpenMetaObjectType::createProperty(), 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.