From: Christian Kamm Date: Tue, 29 Nov 2011 07:52:14 +0000 (+0100) Subject: qmlplugindump: Avoid reporting types as attaching to themselves. X-Git-Tag: qt-v5.0.0-alpha1~992 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=409aecbe1e30aa1319ea72bf830c405827e13d21;p=profile%2Fivi%2Fqtdeclarative.git qmlplugindump: Avoid reporting types as attaching to themselves. Task-number: QTCREATORBUG-6625 Change-Id: I9f778757b490cb5d79249b92f8c7b6d9d1df66e6 Reviewed-by: Leandro Melo --- diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index d52469a..5e35abc 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -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))); + } } }