summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlpropertycache_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-01 03:25:49 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-05 02:39:05 (GMT)
commit69c58d7e1c5713d1d6badeffc6c45eeacb1ba2d8 (patch)
treed060f3f7a76a7952f37196a2f50ad91b667a465d /src/declarative/qml/qmlpropertycache_p.h
parent99cf375f554fe01cf47fd4e1a291d4bba62b4018 (diff)
downloadQt-69c58d7e1c5713d1d6badeffc6c45eeacb1ba2d8.zip
Qt-69c58d7e1c5713d1d6badeffc6c45eeacb1ba2d8.tar.gz
Qt-69c58d7e1c5713d1d6badeffc6c45eeacb1ba2d8.tar.bz2
QmlMetaProperty cleanup
Diffstat (limited to 'src/declarative/qml/qmlpropertycache_p.h')
-rw-r--r--src/declarative/qml/qmlpropertycache_p.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlpropertycache_p.h b/src/declarative/qml/qmlpropertycache_p.h
index 21c8ef3..149d2a0 100644
--- a/src/declarative/qml/qmlpropertycache_p.h
+++ b/src/declarative/qml/qmlpropertycache_p.h
@@ -69,18 +69,40 @@ public:
struct Data {
inline Data();
+ inline bool operator==(const Data &);
- enum Flag { IsFunction = 0x00000001,
+ enum Flag {
+ // Can apply to all properties, except IsFunction
+ IsConstant = 0x00000004,
+
+ // These are mutually exclusive
+ IsFunction = 0x00000001,
IsQObjectDerived = 0x00000002,
- IsConstant = 0x00000004 };
+ IsEnumType = 0x00000008,
+ IsQmlList = 0x00000010,
+ IsQList = 0x00000020,
+ IsQmlBinding = 0x00000040
+ };
Q_DECLARE_FLAGS(Flags, Flag)
+ bool isValid() const { return coreIndex != -1; }
+
Flags flags;
int propType;
int coreIndex;
int notifyIndex;
QString name;
+
+ void load(const QMetaProperty &);
+ void load(const QMetaMethod &);
+ };
+
+#if 0
+ struct 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 *);
@@ -106,6 +128,15 @@ QmlPropertyCache::Data::Data()
{
}
+bool QmlPropertyCache::Data::operator==(const QmlPropertyCache::Data::Data &other)
+{
+ return flags == other.flags &&
+ propType == other.propType &&
+ coreIndex == other.coreIndex &&
+ notifyIndex == other.notifyIndex &&
+ name == other.name;
+}
+
QmlPropertyCache::Data *
QmlPropertyCache::property(const QScriptDeclarativeClass::Identifier &id) const
{