diff options
author | Guoqing Zhang <guoqing.zhang@nokia.com> | 2011-04-05 11:29:44 (GMT) |
---|---|---|
committer | Guoqing Zhang <guoqing.zhang@nokia.com> | 2011-04-05 11:29:44 (GMT) |
commit | bb5bf52e3d8660ee15aec9e959730e265b81eda4 (patch) | |
tree | 548df7f6c522ae077d6b3313456042b3e3922a4c /tools/qdoc3/cppcodeparser.cpp | |
parent | 8a72b97df7cec679a82d6aa93307350fe03cc145 (diff) | |
parent | c3e903409b96fede96cb4a7b95ba308663c88879 (diff) | |
download | Qt-bb5bf52e3d8660ee15aec9e959730e265b81eda4.zip Qt-bb5bf52e3d8660ee15aec9e959730e265b81eda4.tar.gz Qt-bb5bf52e3d8660ee15aec9e959730e265b81eda4.tar.bz2 |
Merge remote branch 'qt-master/master'
Diffstat (limited to 'tools/qdoc3/cppcodeparser.cpp')
-rw-r--r-- | tools/qdoc3/cppcodeparser.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 3979176..595756a 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -863,10 +863,12 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc, } if (qmlPropGroup) { 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); + + const PropertyNode *correspondingProperty = 0; + if (correspondingClass) { + correspondingProperty = qmlPropNode->correspondingProperty(tre); + } if (correspondingProperty) { bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*'); qmlPropNode->setWritable(writableList || correspondingProperty->isWritable()); @@ -1829,7 +1831,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent) QString key = previousLexeme(); QString value; - if (match(Tok_Ident)) { + if (match(Tok_Ident) || match(Tok_Number)) { value = previousLexeme(); } else if (match(Tok_LeftParen)) { @@ -1872,8 +1874,15 @@ bool CppCodeParser::matchProperty(InnerNode *parent) tre->addPropertyFunction(property, value, PropertyNode::Resetter); else if (key == "NOTIFY") { tre->addPropertyFunction(property, value, PropertyNode::Notifier); - } - else if (key == "SCRIPTABLE") { + } else if (key == "REVISION") { + int revision; + bool ok; + revision = value.toInt(&ok); + if (ok) + property->setRevision(revision); + else + parent->doc().location().warning(tr("Invalid revision number: %1").arg(value)); + } else if (key == "SCRIPTABLE") { QString v = value.toLower(); if (v == "true") property->setScriptable(true); @@ -1884,7 +1893,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent) property->setRuntimeScrFunc(value); } } - else if (key == "COSTANT") + else if (key == "CONSTANT") property->setConstant(); else if (key == "FINAL") property->setFinal(); |