QmlDesigner.MetaInfo: Support dot properties defined as components

We can resolve the ObjectValue by using the context and document.

Change-Id: I494737b67e67ce161ef3141356cdb1a380df50ce
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Thomas Hartmann
2014-05-16 11:14:09 +02:00
parent 4390a0f11f
commit e3ddc5ffc9

View File

@@ -94,8 +94,12 @@ static TypeName resolveTypeName(const ASTPropertyReference *ref, const ContextPt
return type;
if (const ASTObjectValue * astObjectValue = value->asAstObjectValue()) {
if (astObjectValue->typeName())
if (astObjectValue->typeName()) {
type = astObjectValue->typeName()->name.toUtf8();
const ObjectValue * objectValue = context->lookupType(astObjectValue->document(), astObjectValue->typeName());;
if (objectValue)
dotProperties = getObjectTypes(objectValue, context);
}
} else if (const ObjectValue * objectValue = value->asObjectValue()) {
type = objectValue->className().toUtf8();
dotProperties = getObjectTypes(objectValue, context);