qmlplugindump: Avoid reporting types as attaching to themselves.

Task-number: QTCREATORBUG-6625
Change-Id: I9f778757b490cb5d79249b92f8c7b6d9d1df66e6
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Christian Kamm 2011-11-29 08:52:14 +01:00 committed by Qt by Nokia
parent 7c83628f5e
commit 409aecbe1e
1 changed files with 6 additions and 2 deletions

View File

@ -359,8 +359,12 @@ public:
qml->writeArrayBinding(QLatin1String("exportMetaObjectRevisions"), metaObjectRevisions);
if (const QMetaObject *attachedType = (*qmlTypes.begin())->attachedPropertiesType()) {
qml->writeScriptBinding(QLatin1String("attachedType"), enquote(
convertToId(attachedType)));
// Can happen when a type is registered that returns itself as attachedPropertiesType()
// because there is no creatable type to attach to.
if (attachedType != meta) {
qml->writeScriptBinding(QLatin1String("attachedType"), enquote(
convertToId(attachedType)));
}
}
}