Improve error message

Show more datails about what actually went wrong.

Change-Id: I418a4d1f433bd4d440fc34e9a4932a9ea010b174
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Rainer Keller 2019-01-21 10:02:01 +01:00
parent 2b9859c87c
commit d27d896d8c
3 changed files with 7 additions and 3 deletions

View File

@ -276,7 +276,11 @@ QVector<QQmlCompileError> QQmlPropertyValidator::validateObject(int objectIndex,
}
} else {
if (!enginePrivate->propertyCacheForType(pd->propType())) {
return recordError(binding->location, tr("Invalid grouped property access"));
return recordError(binding->location,
tr("Invalid grouped property access: Property \"%1\" with type \"%2\", which is not a value type")
.arg(name)
.arg(QString::fromLatin1(QMetaType::typeName(pd->propType())))
);
}
}
}

View File

@ -1 +1 @@
5:5:Invalid grouped property access
5:5:Invalid grouped property access: Property "o" with type "QVariant", which is not a value type

View File

@ -1 +1 @@
4:5:Invalid grouped property access
4:5:Invalid grouped property access: Property "customType" with type "MyCustomVariantType", which is not a value type