From d884420b94abc637b2fcef6585a1fb5c93b69c2c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 3 Jun 2015 14:18:51 +0200 Subject: qdoc: Improve documentation for properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This update changes how qdoc handles getter, setter, resetter, and notifier functions for properties. With this update, if you provide documentation for any of these functions associated with a property, links to that function will go to the documentation for that function, instead of to the associated property. Additionally, the documentation for the function will have a note added, e.g. "Note: Notifier signal for property fubar," where the fubar property name is a link to the documentation for property fubar. Change-Id: I1f821fd4a6c2de142da4718ef3bdde314dc59627 Task-number: QTBUG-45620 Reviewed-by: Venugopal Shivashankar Reviewed-by: Topi Reiniƶ --- src/tools/qdoc/qdocindexfiles.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/tools/qdoc/qdocindexfiles.cpp') diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp index b80b1cc2497..74b0b143478 100644 --- a/src/tools/qdoc/qdocindexfiles.cpp +++ b/src/tools/qdoc/qdocindexfiles.cpp @@ -1189,9 +1189,11 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, if (functionNode->relates()) { writer.writeAttribute("relates", functionNode->relates()->name()); } - const PropertyNode* propertyNode = functionNode->associatedProperty(); - if (propertyNode) - writer.writeAttribute("associated-property", propertyNode->name()); + if (functionNode->hasAssociatedProperties()) { + foreach (PropertyNode* pn, functionNode->associatedProperties()) { + writer.writeAttribute("associated-property", pn->name()); + } + } writer.writeAttribute("type", functionNode->returnType()); if (!brief.isEmpty()) writer.writeAttribute("brief", brief); -- cgit v1.2.3