summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-11-29 07:52:14 (GMT)
committerChristian Kamm <christian.d.kamm@nokia.com>2011-12-02 11:03:33 (GMT)
commita6ab48bec20a746ae9bd54c1ea8a260af9967c04 (patch)
tree292ad98ec9f93f56ccdcb69bee139ae7339f070d /tools
parent46db88be9fb0b8951916d706c39e1079f38f277d (diff)
downloadQt-a6ab48bec20a746ae9bd54c1ea8a260af9967c04.zip
Qt-a6ab48bec20a746ae9bd54c1ea8a260af9967c04.tar.gz
Qt-a6ab48bec20a746ae9bd54c1ea8a260af9967c04.tar.bz2
qmlplugindump: Avoid reporting types as attaching to themselves.
Task-number: QTCREATORBUG-6625 Change-Id: I9f778757b490cb5d79249b92f8c7b6d9d1df66e6 Reviewed-by: Leandro Melo <leandro.melo@nokia.com> (backported from 409aecbe1e30aa1319ea72bf830c405827e13d21)
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlplugindump/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 4f523b9..9647704 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -308,8 +308,12 @@ public:
qml->writeArrayBinding(QLatin1String("exports"), exports);
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)));
+ }
}
}