diff options
author | mread <qt-info@nokia.com> | 2009-08-10 13:18:56 (GMT) |
---|---|---|
committer | mread <qt-info@nokia.com> | 2009-08-10 13:18:56 (GMT) |
commit | 34dd8163f4fcd16be5677fc94ce960cc464991d5 (patch) | |
tree | f871fef42b4f337a98bce77ad307efe079b7dc5f /tools/qdoc3/htmlgenerator.cpp | |
parent | 0dfca6e13a7ad3cce38d5509d446f76eb496f398 (diff) | |
parent | 70e098d965318651acb725374b73e026f2946b76 (diff) | |
download | Qt-34dd8163f4fcd16be5677fc94ce960cc464991d5.zip Qt-34dd8163f4fcd16be5677fc94ce960cc464991d5.tar.gz Qt-34dd8163f4fcd16be5677fc94ce960cc464991d5.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'tools/qdoc3/htmlgenerator.cpp')
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 425c50b..26874e1 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -539,16 +539,14 @@ int HtmlGenerator::generateAtom(const Atom *atom, break; case Atom::AnnotatedList: { - const FakeNode *fake = static_cast<const FakeNode *>(relative); - if (fake && !fake->groupMembers().isEmpty()) { - QList<Node*> values = tre->groups().values(atom->string()); - QMap<QString, const Node*> nodeMap; - for (int i = 0; i < values.size(); ++i) { - const Node* n = values.at(i); + QList<Node*> values = tre->groups().values(atom->string()); + QMap<QString, const Node*> nodeMap; + for (int i = 0; i < values.size(); ++i) { + const Node* n = values.at(i); + if ((n->status() != Node::Internal) && (n->access() != Node::Private)) nodeMap.insert(n->name(),n); - } - generateAnnotatedList(fake, marker, nodeMap); } + generateAnnotatedList(relative, marker, nodeMap); } break; case Atom::GeneratedList: @@ -2021,8 +2019,8 @@ void HtmlGenerator::generateCompactList(const Node *relative, assume that NumParagraphs is 37. Each paragraph is a QMap<QString, const Node *>. */ - QMap<QString, const Node *> paragraph[NumParagraphs]; - QString paragraphName[NumParagraphs]; + QMap<QString, const Node *> paragraph[NumParagraphs+1]; + QString paragraphName[NumParagraphs+1]; QMap<QString, const Node *>::ConstIterator c = classMap.begin(); while (c != classMap.end()) { @@ -2055,22 +2053,22 @@ void HtmlGenerator::generateCompactList(const Node *relative, We now want to compute the paragraph offset. Paragraphs 0 to 6 start at offsets 0, 3, 4, 8, 9, 14, 23. */ - int paragraphOffset[NumParagraphs + 1]; + int paragraphOffset[NumParagraphs + 1]; // 37 + 1 int i, j, k; paragraphOffset[0] = 0; - for (j = 0; j < NumParagraphs; j++) + for (j = 0; j < NumParagraphs; j++) // j = 0..36 paragraphOffset[j + 1] = paragraphOffset[j] + paragraph[j].count(); - int firstOffset[NumColumns + 1]; - int currentOffset[NumColumns]; - int currentParagraphNo[NumColumns]; - int currentOffsetInParagraph[NumColumns]; + int firstOffset[NumColumns + 1]; // 4 + 1 + int currentOffset[NumColumns]; // 4 + int currentParagraphNo[NumColumns]; // 4 + int currentOffsetInParagraph[NumColumns]; // 4 int numRows = (classMap.count() + NumColumns - 1) / NumColumns; int curParagNo = 0; - for (i = 0; i < NumColumns; i++) { + for (i = 0; i < NumColumns; i++) { // i = 0..3 firstOffset[i] = qMin(i * numRows, classMap.size()); currentOffset[i] = firstOffset[i]; @@ -2095,11 +2093,18 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << "<td>\n</td>\n"; } else { - while (currentOffsetInParagraph[i] == paragraph[currentParagraphNo[i]].count()) { + while ((currentParagraphNo[i] < NumParagraphs) && + (currentOffsetInParagraph[i] == paragraph[currentParagraphNo[i]].count())) { ++currentParagraphNo[i]; currentOffsetInParagraph[i] = 0; } - +#if 0 + if (currentParagraphNo[i] >= NumParagraphs) { + qDebug() << "### Internal error ###" << __FILE__ << __LINE__ + << currentParagraphNo[i] << NumParagraphs; + currentParagraphNo[i] = NumParagraphs - 1; + } +#endif out() << "<td align=\"right\">"; if (currentOffsetInParagraph[i] == 0) { // start a new paragraph @@ -2109,7 +2114,8 @@ void HtmlGenerator::generateCompactList(const Node *relative, } out() << "</td>\n"; - if (!paragraphName[currentParagraphNo[i]].isEmpty()) { + if ((currentParagraphNo[i] < NumParagraphs) && + !paragraphName[currentParagraphNo[i]].isEmpty()) { QMap<QString, const Node *>::Iterator it; it = paragraph[currentParagraphNo[i]].begin(); for (j = 0; j < currentOffsetInParagraph[i]; j++) @@ -3708,12 +3714,6 @@ QString HtmlGenerator::getLink(const Atom *atom, } inObsoleteLink = true; } -#if 0 - qDebug() << "Link to Obsolete entity" - << (*node)->name(); - qDebug() << " relative entity" - << relative->name(); -#endif } } } @@ -3729,8 +3729,6 @@ QString HtmlGenerator::getLink(const Atom *atom, else if ((*node)->status() == Node::Internal) { qDebug() << "Link to Internal entity"; } - //else - //qDebug() << "Node Status:" << (*node)->status(); #endif } @@ -4014,10 +4012,6 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn, generateText(text, cn, marker); out() << "</p>"; } -// else -// qDebug() << "generateQmlInherits(): " -// << "Inherited element not documented -->" -// << linkPair.first; } } } |