qdoc: Listing QML group members across modules
This is a second update, which fixes the "All QML APIs by Module" page, I think. I expect there will be more insifious places where this problem will pop up. qdoc must be dragged, kicking and screaming into the modular age. Task-number: QTBUG-28036 Change-Id: I8dd4733a2b0aac9bab3cb2066b6dbf139a8e98a6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
5e59215ac6
commit
793ed1bf88
@ -232,6 +232,10 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
|
||||
subtype = Node::Module;
|
||||
ptype = Node::OverviewPage;
|
||||
}
|
||||
else if (element.attribute("subtype") == "qmlmodule") {
|
||||
subtype = Node::QmlModule;
|
||||
ptype = Node::OverviewPage;
|
||||
}
|
||||
else if (element.attribute("subtype") == "page") {
|
||||
subtype = Node::Page;
|
||||
ptype = Node::ArticlePage;
|
||||
@ -449,11 +453,12 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
|
||||
|
||||
QString groupsAttr = element.attribute("groups");
|
||||
if (!groupsAttr.isEmpty()) {
|
||||
QStringList groupNames = groupsAttr.split(" ");
|
||||
QStringList groupNames = groupsAttr.split(",");
|
||||
for (int i=0; i<groupNames.size(); ++i) {
|
||||
DocNode* dn = qdb_->findGroup(groupNames[i]);
|
||||
if (dn)
|
||||
if (dn) {
|
||||
dn->addMember(node);
|
||||
}
|
||||
else {
|
||||
qDebug() << "NODE:" << node->name() << "GROUPS:" << groupNames;
|
||||
qDebug() << "DID NOT FIND GROUP:" << dn->name() << "for:" << node->name();
|
||||
@ -537,7 +542,7 @@ void QDocIndexFiles::writeMembersAttribute(QXmlStreamWriter& writer,
|
||||
++i;
|
||||
}
|
||||
if (!names.isEmpty())
|
||||
writer.writeAttribute(attr, names.join(" "));
|
||||
writer.writeAttribute(attr, names.join(","));
|
||||
}
|
||||
}
|
||||
|
||||
@ -749,13 +754,16 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
|
||||
foreach (const Node* member, members) {
|
||||
names.append(member->name());
|
||||
}
|
||||
writer.writeAttribute("members", names.join(" "));
|
||||
writer.writeAttribute("members", names.join(","));
|
||||
writeModuleName = true;
|
||||
}
|
||||
break;
|
||||
case Node::Module:
|
||||
writer.writeAttribute("subtype", "module");
|
||||
break;
|
||||
case Node::QmlModule:
|
||||
writer.writeAttribute("subtype", "qmlmodule");
|
||||
break;
|
||||
case Node::Page:
|
||||
writer.writeAttribute("subtype", "page");
|
||||
writeModuleName = true;
|
||||
|
@ -344,7 +344,7 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
|
||||
else if ((command == COMMAND_INGROUP) && !args.isEmpty()) {
|
||||
ArgList::ConstIterator argsIter = args.constBegin();
|
||||
while (argsIter != args.constEnd()) {
|
||||
QDocDatabase::qdocDB()->addToGroup(argsIter->first, node);
|
||||
DocNode* dn = QDocDatabase::qdocDB()->addToGroup(argsIter->first, node);
|
||||
++argsIter;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user