From 08ab82e447a0cac0a48daf900c57127c2ee534d2 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 29 Oct 2010 12:34:53 +0200 Subject: qdoc: Don't put classes that have empty doc in hierarchy. --- tools/qdoc3/ditaxmlgenerator.cpp | 17 +++-------------- tools/qdoc3/htmlgenerator.cpp | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index fa0aa43..a885f29 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2271,18 +2271,6 @@ void DitaXmlGenerator::generateTitle(const QString& title, void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) { Text brief = node->doc().briefText(true); // zzz - if (outFileName() == "requirements-x11.xml") { - if (brief.isEmpty()) - qDebug() << "EMPTY BRIEF"; - else { - qDebug() << "NON-EMPTY BRIEF"; - Atom* a = brief.firstAtom(); - while (a != 0) { - qDebug() << " " << a->type() << a->typeString() << a->string(); - a = a->next(); - } - } - } if (!brief.isEmpty()) { generateText(brief, node, marker); } @@ -2626,7 +2614,7 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative, NodeMap newTop; foreach (const RelatedClass &d, child->derivedClasses()) { - if (d.access != Node::Private) + if (d.access != Node::Private && !d.node->doc().isEmpty()) newTop.insert(d.node->name(), d.node); } if (!newTop.isEmpty()) { @@ -4587,7 +4575,8 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) // not included: xmlWriter().writeStartElement(CXXCLASSBASECLASS); - xmlWriter().writeAttribute("href",(*r).node->ditaXmlHref()); + QString attr = fileName((*r).node) + "#" + (*r).node->guid(); + xmlWriter().writeAttribute("href",attr); xmlWriter().writeCharacters(marker->plainFullName((*r).node)); xmlWriter().writeEndElement(); // diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 19b86e0..9ce8522 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2424,7 +2424,7 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative, NodeMap newTop; foreach (const RelatedClass &d, child->derivedClasses()) { - if (d.access != Node::Private) + if (d.access != Node::Private && !d.node->doc().isEmpty()) newTop.insert(d.node->name(), d.node); } if (!newTop.isEmpty()) { -- cgit v0.12