diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-03-12 15:27:09 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-12 23:28:40 +0100 |
commit | b0215058436a39953d8702c1671561175af91a6c (patch) | |
tree | e1637020742507a16610cf9c87b28161844eb577 /src/qml/qml/v4/qv4irbuilder.cpp | |
parent | 31aa6012bfb575dd85a5083353fd10487dcbcdaa (diff) |
Fix v4 nested object access bug.
Use the correct type to look up the sub property.
Task-number: QTBUG-24606
Change-Id: Iab372ca7440249241bf855d2875a947ad8fe4527
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/qml/qml/v4/qv4irbuilder.cpp')
-rw-r--r-- | src/qml/qml/v4/qv4irbuilder.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/v4/qv4irbuilder.cpp b/src/qml/qml/v4/qv4irbuilder.cpp index 36e88e5276..06f4024423 100644 --- a/src/qml/qml/v4/qv4irbuilder.cpp +++ b/src/qml/qml/v4/qv4irbuilder.cpp @@ -628,7 +628,8 @@ bool QV4IRBuilder::visit(AST::FieldMemberExpression *ast) case IR::Name::Property: if (baseName->type == IR::ObjectType && baseName->meta && baseName->property->isFinal()) { - QQmlPropertyCache *cache = m_engine->cache(baseName->meta); + const QMetaObject *meta = m_engine->metaObjectForType(baseName->property->propType); + QQmlPropertyCache *cache = m_engine->cache(meta); if (!cache) return false; @@ -640,9 +641,9 @@ bool QV4IRBuilder::visit(AST::FieldMemberExpression *ast) return false; // We don't know enough about this property } - IR::Type irType = irTypeFromVariantType(data->propType, m_engine, baseName->meta); + IR::Type irType = irTypeFromVariantType(data->propType, m_engine, meta); _expr.code = _block->SYMBOL(baseName, irType, name, - baseName->meta, data, line, column); + meta, data, line, column); } } break; |