From: Aaron Kennedy Date: Fri, 22 Jul 2011 01:51:41 +0000 (+1000) Subject: Use the cached property data when possible X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=0b03d57a3ffcdb0514061242a6d7423faba30b92;p=konrad%2Fqtdeclarative.git Use the cached property data when possible Change-Id: I6690208b9a4d99e485874c5253d69cb82938c8a6 Reviewed-on: http://codereview.qt.nokia.com/3768 Reviewed-by: Roberto Raggi Reviewed-by: Qt Sanity Bot --- diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index bb2742c..622949c 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1614,7 +1614,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop, COMPILE_CHECK(buildGroupedProperty(prop, obj, ctxt)); - } else if (enginePrivate->isList(prop->type)) { + } else if (prop->core.isQList()) { COMPILE_CHECK(buildListProperty(prop, obj, ctxt)); @@ -1668,7 +1668,7 @@ bool QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeImportedNamespac void QDeclarativeCompiler::genValueProperty(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj) { - if (enginePrivate->isList(prop->type)) { + if (prop->core.isQList()) { genListProperty(prop, obj); } else { genPropertyAssignment(prop, obj); @@ -2021,7 +2021,7 @@ bool QDeclarativeCompiler::buildListProperty(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj, const BindingContext &ctxt) { - Q_ASSERT(enginePrivate->isList(prop->type)); + Q_ASSERT(prop->core.isQList()); int t = prop->type; @@ -3011,9 +3011,7 @@ bool QDeclarativeCompiler::buildBinding(QDeclarativeParser::Value *value, Q_ASSERT(prop->parent); Q_ASSERT(prop->parent->metaObject()); - // XXX aakenned - QMetaProperty mp = prop->parent->metaObject()->property(prop->index); - if (!mp.isWritable() && !QDeclarativeMetaType::isList(prop->type)) + if (!prop->core.isWritable() && !prop->core.isQList()) COMPILE_EXCEPTION(prop, tr("Invalid property assignment: \"%1\" is a read-only property").arg(prop->name().toString())); BindingReference *reference = pool->New();