forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user