From 1ae2a0227a3717714444b5b7153c6b63dce016d9 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 20 Mar 2012 14:08:25 +0100 Subject: [PATCH] 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 --- src/tools/qdoc/qmlvisitor.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp index 9c934ebcd1..956f874cbf 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);