diff options
-rw-r--r-- | tools/qmlplugindump/main.cpp | 8 | ||||
-rw-r--r-- | tools/qmlplugindump/qmlstreamwriter.cpp | 3 |
2 files changed, 7 insertions, 4 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))); + } } } diff --git a/tools/qmlplugindump/qmlstreamwriter.cpp b/tools/qmlplugindump/qmlstreamwriter.cpp index ca52a7a..48d1b02 100644 --- a/tools/qmlplugindump/qmlstreamwriter.cpp +++ b/tools/qmlplugindump/qmlstreamwriter.cpp @@ -93,8 +93,7 @@ void QmlStreamWriter::writeEndObject() m_pendingLineLength = 0; m_maybeOneline = false; } else { - if (m_maybeOneline) - flushPotentialLinesWithNewlines(); + flushPotentialLinesWithNewlines(); --m_indentDepth; writeIndent(); m_stream->write("}\n"); |