From b1addf36c19748a29bd9f901579a23355b081fe9 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 11 Apr 2012 12:50:22 +0200 Subject: qdoc: Fixed to report read-only QML properties correctly Now the default for a QML property is writable. If qdoc can't detect the actual read-only status, writable is assumed. There were some cases where qdoc could not determine the actual read-only/writable status for a QML property. In these cases, qdoc reported read-only because the default was read-only, which was not optimal. Change-Id: I55aeb2bedcde92a414f4d48a8d995e5e9dbca5da Reviewed-by: Casper van Donderen --- src/tools/qdoc/cppcodemarker.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/tools/qdoc/cppcodemarker.cpp') diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp index aea8ed2119d..165a235a86d 100644 --- a/src/tools/qdoc/cppcodemarker.cpp +++ b/src/tools/qdoc/cppcodemarker.cpp @@ -1258,8 +1258,20 @@ QList
CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, NodeList::ConstIterator c = qcn->childNodes().begin(); while (c != qcn->childNodes().end()) { if ((*c)->subType() == Node::QmlPropertyGroup) { + bool attached = false; const QmlPropGroupNode* pgn = static_cast(*c); - if (pgn->isAttached()) + NodeList::ConstIterator C = pgn->childNodes().begin(); + while (C != pgn->childNodes().end()) { + if ((*C)->type() == Node::QmlProperty) { + const QmlPropertyNode* pn = static_cast(*C); + if (pn->isAttached()) { + attached = true; + break; + } + } + ++C; + } + if (attached) insert(qmlattachedproperties,*c,style,Okay); else insert(qmlproperties,*c,style,Okay); -- cgit v1.2.3