diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-04 06:29:46 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-04 06:29:46 (GMT) |
commit | 1400ce5b85fbe7c67899f5f62bfd276eecb21ae0 (patch) | |
tree | ccc72723d2305b4d24f9ec296e6d9ee7d3d9d16a /tools/qdoc3/cppcodeparser.cpp | |
parent | 867be3fd7a2017377e8ae5cc3ab789b3b01733bd (diff) | |
parent | be71186962db5974113e89b0e7c7aa1ab3987379 (diff) | |
download | Qt-1400ce5b85fbe7c67899f5f62bfd276eecb21ae0.zip Qt-1400ce5b85fbe7c67899f5f62bfd276eecb21ae0.tar.gz Qt-1400ce5b85fbe7c67899f5f62bfd276eecb21ae0.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'tools/qdoc3/cppcodeparser.cpp')
-rw-r--r-- | tools/qdoc3/cppcodeparser.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 843bec8..cabbe38 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -799,14 +799,26 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc, } } if (qmlPropGroup) { - new QmlPropertyNode(qmlPropGroup,property,type,attached); + const ClassNode *correspondingClass = static_cast<const QmlClassNode*>(qmlPropGroup->parent())->classNode(); + PropertyNode *correspondingProperty = 0; + if (correspondingClass) + correspondingProperty = static_cast<PropertyNode*>((Node*)correspondingClass->findNode(property, Node::Property)); + QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup,property,type,attached); + if (correspondingProperty) { + bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*'); + qmlPropNode->setWritable(writableList || correspondingProperty->isWritable()); + } ++arg; while (arg != args.end()) { if (splitQmlPropertyArg(doc,(*arg),type,element,property)) { - new QmlPropertyNode(qmlPropGroup, + QmlPropertyNode * qmlPropNode = new QmlPropertyNode(qmlPropGroup, property, type, attached); + if (correspondingProperty) { + bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*'); + qmlPropNode->setWritable(writableList || correspondingProperty->isWritable()); + } } ++arg; } @@ -1751,9 +1763,10 @@ bool CppCodeParser::matchProperty(InnerNode *parent) if (key == "READ") tre->addPropertyFunction(property, value, PropertyNode::Getter); - else if (key == "WRITE") + else if (key == "WRITE") { tre->addPropertyFunction(property, value, PropertyNode::Setter); - else if (key == "STORED") + property->setWritable(true); + } else if (key == "STORED") property->setStored(value.toLower() == "true"); else if (key == "DESIGNABLE") property->setDesignable(value.toLower() == "true"); |