From: Martin Smith Date: Tue, 20 Mar 2012 13:08:25 +0000 (+0100) Subject: qdoc: Handle multiple \ingroup commands in QML types. X-Git-Tag: qt-v5.0.0-alpha1~186 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ae2a0227a3717714444b5b7153c6b63dce016d9;p=profile%2Fivi%2Fqtbase.git qdoc: Handle multiple \ingroup commands in QML types. These were not handled in the QmlVisitor class. It was believed they would appear as separate commands in QmlVisitor, but the appear as one \ingroup command followed by several group identifiers. Change-Id: If198433f7cd5095264f41346987c49ee4c30a786 Reviewed-by: Casper van Donderen --- diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp index 9c934eb..956f874 100644 --- a/src/tools/qdoc/qmlvisitor.cpp +++ b/src/tools/qdoc/qmlvisitor.cpp @@ -266,6 +266,7 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation, if (!topic.isEmpty()) { args = doc.metaCommandArgs(topic); if (topic == COMMAND_QMLCLASS) { + // do nothing. } else if (topic == COMMAND_QMLPROPERTY) { if (node->type() == Node::QmlProperty) { @@ -320,7 +321,6 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation, if (node->name() == args[0]) doc.location().warning(tr("%1 tries to inherit itself").arg(args[0])); else { - qDebug() << "QML Component:" << node->name() << "inherits:" << args[0]; CodeParser::setLink(node, Node::InheritsLink, args[0]); if (node->subType() == Node::QmlClass) { QmlClassNode::addInheritedBy(args[0],node); @@ -339,8 +339,12 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation, qpn->setReadOnly(1); } } - else if (command == COMMAND_INGROUP) { - tree->addToGroup(node, args[0]); + else if ((command == COMMAND_INGROUP) && !args.isEmpty()) { + QStringList::ConstIterator arg = args.begin(); + while (arg != args.end()) { + tree->addToGroup(node, *arg); + ++arg; + } } else if (command == COMMAND_INTERNAL) { node->setAccess(Node::Private);