aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecompiler.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-07-04 12:41:21 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-04 07:27:11 +0200
commit71114ff964582f58e68d68bf0301cd42110751cc (patch)
treee3ad3d3e1af59ef9dc32aa28ce12a6d70a89a03a /src/declarative/qml/qdeclarativecompiler.cpp
parent8371e37e47967848ec470a4b34f46b1c8591c3c1 (diff)
Optimize QDeclarativePropertyCache
The creation of QDeclarativePropertyCaches contributes significantly to the initial compile time of a QML app. Change-Id: Iac5d1578155dfa4678a0e21eab51f4c1675762a9 Reviewed-on: http://codereview.qt.nokia.com/1026 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index bca9c65fcc..32025cc416 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -981,7 +981,8 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
reinterpret_cast<const QDeclarativeVMEMetaData *>(obj->synthdata.constData());
for (int ii = 0; ii < vmeMetaData->aliasCount; ++ii) {
int index = obj->metaObject()->propertyOffset() + vmeMetaData->propertyCount + ii;
- propertyCache->property(index)->flags |= QDeclarativePropertyCache::Data::IsAlias;
+ QDeclarativePropertyCache::Data *data = propertyCache->property(index);
+ data->setFlags(data->getFlags() | QDeclarativePropertyCache::Data::IsAlias);
}
}
@@ -1546,8 +1547,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
output->types.at(prop->parent->type).component) {
QDeclarativePropertyCache *cache = output->types.at(prop->parent->type).component->rootPropertyCache;
- if (cache && cache->property(prop->index) &&
- cache->property(prop->index)->flags & QDeclarativePropertyCache::Data::IsAlias)
+ if (cache && cache->property(prop->index) && cache->property(prop->index)->isAlias())
prop->isAlias = true;
}
@@ -3138,7 +3138,7 @@ int QDeclarativeCompiler::indexOfSignal(QDeclarativeParser::Object *object, cons
QDeclarativePropertyCache::Data *d = cache->property(strName);
if (notInRevision) *notInRevision = false;
- while (d && !(d->flags & QDeclarativePropertyCache::Data::IsFunction))
+ while (d && !(d->isFunction()))
d = cache->overrideData(d);
if (d && !cache->isAllowedInRevision(d)) {
@@ -3178,7 +3178,7 @@ int QDeclarativeCompiler::indexOfProperty(QDeclarativeParser::Object *object, co
QDeclarativePropertyCache::Data *d = cache->property(strName);
// Find the first property
- while (d && d->flags & QDeclarativePropertyCache::Data::IsFunction)
+ while (d && d->isFunction())
d = cache->overrideData(d);
if (d && !cache->isAllowedInRevision(d)) {