Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.0.0
-
None
Description
See http://codereview.qt-project.org/18494 for an autotest reproducing the issue.
The following seems to fix the issue, but I am not sure if it is correct/complete
diff --git a/src/declarative/qml/v4/qv4irbuilder.cpp b/src/declarative/qml/v4/qv4irbuilder.cpp index 522bc01..4445f02 100644 --- a/src/declarative/qml/v4/qv4irbuilder.cpp +++ b/src/declarative/qml/v4/qv4irbuilder.cpp @@ -624,7 +624,8 @@ bool QV4IRBuilder::visit(AST::FieldMemberExpression *ast) case IR::Name::Property: if (baseName->type == IR::ObjectType && baseName->meta && baseName->property->isFinal()) { - QDeclarativePropertyCache *cache = m_engine->cache(baseName->meta); + const QMetaObject *meta = m_engine->metaObjectForType(baseName->property->propType); + QDeclarativePropertyCache *cache = m_engine->cache(meta); if (!cache) return false; @@ -636,9 +637,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;