diff options
author | Geir Vattekar <geir.vattekar@nokia.com> | 2010-06-29 13:13:40 (GMT) |
---|---|---|
committer | Geir Vattekar <geir.vattekar@nokia.com> | 2010-06-29 13:13:40 (GMT) |
commit | c2c720cf948f2779aa82e003a2db4d951f94e77f (patch) | |
tree | 0f3662fcf8a336f6cd7d5090184f7ead2336691e /tools/qdoc3/cppcodeparser.cpp | |
parent | 497fd44414dea6314731b96869e2d49bb8b439b5 (diff) | |
parent | 1209a398c3b59b21b38036fffd4fb2442320e5c3 (diff) | |
download | Qt-c2c720cf948f2779aa82e003a2db4d951f94e77f.zip Qt-c2c720cf948f2779aa82e003a2db4d951f94e77f.tar.gz Qt-c2c720cf948f2779aa82e003a2db4d951f94e77f.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'tools/qdoc3/cppcodeparser.cpp')
-rw-r--r-- | tools/qdoc3/cppcodeparser.cpp | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 13678af..e4870e3 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -728,7 +728,10 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, if (n) classNode = static_cast<const ClassNode*>(n); } - return new QmlClassNode(tre->root(), names[0], classNode); + if (names[0].startsWith("Q")) + return new QmlClassNode(tre->root(), QLatin1String("QML:")+names[0], classNode); + else + return new QmlClassNode(tre->root(), names[0], classNode); } else if (command == COMMAND_QMLBASICTYPE) { #if 0 @@ -752,6 +755,8 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, QString type; QmlClassNode* qmlClass = 0; if (splitQmlMethodArg(doc,arg,type,element)) { + if (element.startsWith(QLatin1String("Q"))) + element = QLatin1String("QML:") + element; Node* n = tre->findNode(QStringList(element),Node::Fake); if (n && n->subType() == Node::QmlClass) { qmlClass = static_cast<QmlClassNode*>(n); @@ -1850,16 +1855,40 @@ bool CppCodeParser::matchProperty(InnerNode *parent) else if (key == "WRITE") { tre->addPropertyFunction(property, value, PropertyNode::Setter); property->setWritable(true); - } else if (key == "STORED") + } + else if (key == "STORED") property->setStored(value.toLower() == "true"); - else if (key == "DESIGNABLE") - property->setDesignable(value.toLower() == "true"); + else if (key == "DESIGNABLE") { + QString v = value.toLower(); + if (v == "true") + property->setDesignable(true); + else if (v == "false") + property->setDesignable(false); + else { + property->setDesignable(false); + property->setRuntimeDesFunc(value); + } + } else if (key == "RESET") tre->addPropertyFunction(property, value, PropertyNode::Resetter); else if (key == "NOTIFY") { tre->addPropertyFunction(property, value, PropertyNode::Notifier); } - + else if (key == "SCRIPTABLE") { + QString v = value.toLower(); + if (v == "true") + property->setScriptable(true); + else if (v == "false") + property->setScriptable(false); + else { + property->setScriptable(false); + property->setRuntimeScrFunc(value); + } + } + else if (key == "COSTANT") + property->setConstant(); + else if (key == "FINAL") + property->setFinal(); } match(Tok_RightParen); return true; |