aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecompiler.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-07-22 11:51:41 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-30 13:18:28 +0200
commit0b03d57a3ffcdb0514061242a6d7423faba30b92 (patch)
tree613a80ae59cbff70e2c23d410fea73943d3f5129 /src/declarative/qml/qdeclarativecompiler.cpp
parent18307bfffff4cf8867706c9b1eafe163465379a7 (diff)
Use the cached property data when possible
Change-Id: I6690208b9a4d99e485874c5253d69cb82938c8a6 Reviewed-on: http://codereview.qt.nokia.com/3768 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index bb2742c4a3..622949cc62 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<BindingReference>();