summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlpropertycache_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-12-03 06:09:31 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-12-03 06:09:31 (GMT)
commit8e45a7b2b66d998c941c1c66bdabc240decd5474 (patch)
treeb1a13e06f996995ecd2847039344ff43cbdb7144 /src/declarative/qml/qmlpropertycache_p.h
parent4a68ca535074625d8ec20435e21fa658652e7680 (diff)
downloadQt-8e45a7b2b66d998c941c1c66bdabc240decd5474.zip
Qt-8e45a7b2b66d998c941c1c66bdabc240decd5474.tar.gz
Qt-8e45a7b2b66d998c941c1c66bdabc240decd5474.tar.bz2
Optimization
Diffstat (limited to 'src/declarative/qml/qmlpropertycache_p.h')
-rw-r--r--src/declarative/qml/qmlpropertycache_p.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlpropertycache_p.h b/src/declarative/qml/qmlpropertycache_p.h
index 8f19a8b..e4efc04 100644
--- a/src/declarative/qml/qmlpropertycache_p.h
+++ b/src/declarative/qml/qmlpropertycache_p.h
@@ -78,7 +78,7 @@ public:
IsWritable = 0x00000002,
// These are mutually exclusive
- IsFunction = 0x00000004,
+ IsFunction = 0x00000004,
IsQObjectDerived = 0x00000008,
IsEnumType = 0x00000010,
IsQmlList = 0x00000020,
@@ -94,18 +94,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 +143,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 +152,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