From 1945441986043e4d045debec68a0ebdd8fb591b9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 23 Jul 2015 08:46:16 +0200 Subject: [PATCH] Don't generate invalid XML An attribute is not allowed twice in XML. So change the associated-property attribute, so that it contains a list of associated properties is required instead of listing them a couple of times. Change-Id: Ibfb21c1a1de5ed39cda2eb29ac318bdbbf0eab4e Reviewed-by: Martin Smith --- src/tools/qdoc/qdocindexfiles.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp index 74b0b143478..c7ff8c8288e 100644 --- a/src/tools/qdoc/qdocindexfiles.cpp +++ b/src/tools/qdoc/qdocindexfiles.cpp @@ -1190,9 +1190,13 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, writer.writeAttribute("relates", functionNode->relates()->name()); } if (functionNode->hasAssociatedProperties()) { + QString associatedProperties; foreach (PropertyNode* pn, functionNode->associatedProperties()) { - writer.writeAttribute("associated-property", pn->name()); + if (!associatedProperties.isEmpty()) + associatedProperties += QLatin1String(", "); + associatedProperties += pn->name(); } + writer.writeAttribute("associated-property", associatedProperties); } writer.writeAttribute("type", functionNode->returnType()); if (!brief.isEmpty())