summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2012-03-20 14:08:25 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-20 14:21:25 +0100
commit1ae2a0227a3717714444b5b7153c6b63dce016d9 (patch)
tree4442e0d1b77ce715ca33263bf41d624506a23c1e
parent95571df87e443540a59de7e4428cbcb18e479f0b (diff)
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 <casper.vandonderen@nokia.com>
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp10
1 files 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);