QmlDesigner: Fix metainfo

We have to check the propertyToken, because the default token
is most likely invalid.

e.g.:
[default] property alias: something

Change-Id: Ieedb1f3907c78d52f4e4406e2a2bf4d93bf1f636
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2019-03-22 10:35:41 +01:00
parent ec0565b26f
commit 29c13a8a25

View File

@@ -85,7 +85,7 @@ static TypeName resolveTypeName(const ASTPropertyReference *ref, const ContextPt
{ {
TypeName type = "unknown"; TypeName type = "unknown";
if (ref->ast()->defaultToken.isValid()) { if (ref->ast()->propertyToken.isValid()) {
type = ref->ast()->memberType->name.toUtf8(); type = ref->ast()->memberType->name.toUtf8();
if (type == "alias") { if (type == "alias") {