diff options
Diffstat (limited to 'src/declarative/qml/qmlpropertycache_p.h')
-rw-r--r-- | src/declarative/qml/qmlpropertycache_p.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/declarative/qml/qmlpropertycache_p.h b/src/declarative/qml/qmlpropertycache_p.h index 8f19a8b..7cee606 100644 --- a/src/declarative/qml/qmlpropertycache_p.h +++ b/src/declarative/qml/qmlpropertycache_p.h @@ -53,11 +53,13 @@ // We mean it. // -#include <private/qmlrefcount_p.h> -#include <private/qscriptdeclarativeclass_p.h> -#include <private/qmlcleanup_p.h> +#include "qmlrefcount_p.h" +#include "qmlcleanup_p.h" + #include <QtCore/qvector.h> +#include <private/qscriptdeclarativeclass_p.h> + QT_BEGIN_NAMESPACE class QmlEngine; @@ -78,7 +80,7 @@ public: IsWritable = 0x00000002, // These are mutually exclusive - IsFunction = 0x00000004, + IsFunction = 0x00000004, IsQObjectDerived = 0x00000008, IsEnumType = 0x00000010, IsQmlList = 0x00000020, @@ -94,18 +96,19 @@ public: int propType; int coreIndex; int notifyIndex; - QString name; void load(const QMetaProperty &); void load(const QMetaMethod &); + QString name(QObject *); + QString name(const QMetaObject *); }; -#if 0 struct ValueTypeData { + inline ValueTypeData(); + inline bool operator==(const ValueTypeData &); int valueTypeCoreIdx; // The prop index of the access property on the value type wrapper int valueTypePropType; // The QVariant::Type of access property on the value type wrapper }; -#endif static QmlPropertyCache *create(QmlEngine *, const QMetaObject *); static Data create(const QMetaObject *, const QString &); @@ -142,8 +145,7 @@ bool QmlPropertyCache::Data::operator==(const QmlPropertyCache::Data &other) return flags == other.flags && propType == other.propType && coreIndex == other.coreIndex && - notifyIndex == other.notifyIndex && - name == other.name; + notifyIndex == other.notifyIndex; } QmlPropertyCache::Data * @@ -152,6 +154,17 @@ QmlPropertyCache::property(const QScriptDeclarativeClass::Identifier &id) const return identifierCache.value(id); } +QmlPropertyCache::ValueTypeData::ValueTypeData() +: valueTypeCoreIdx(-1), valueTypePropType(0) +{ +} + +bool QmlPropertyCache::ValueTypeData::operator==(const ValueTypeData &o) +{ + return valueTypeCoreIdx == o.valueTypeCoreIdx && + valueTypePropType == o.valueTypePropType; +} + QT_END_NAMESPACE #endif // QMLPROPERTYCACHE_P_H |