From ffecdf0bf9f25f7ab9aa4f69e37507dd595fecea Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 12 May 2009 14:18:58 +0200 Subject: Makes the layout of many of the areas be in aligned columns to immensely increase readability Unfortunately the patch causes quite some regressions and I think some refectoring of this class would be needed. I didn't do that since there is no API docs, the variable naming is not very clarifying and the code is hard to read due to it not using the coding style and mixing tabs as well as spaces. --- tools/qdoc3/htmlgenerator.cpp | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 13d52bf..7702628 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2079,17 +2079,7 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela CodeMarker *marker, CodeMarker::SynopsisStyle style) { if (!section.members.isEmpty()) { - bool twoColumn = false; - if (style == CodeMarker::SeparateList) { - twoColumn = (section.members.count() >= 16); - } else if (section.members.first()->type() == Node::Property) { - twoColumn = (section.members.count() >= 5); - } - if (twoColumn) - out() << "

\n" - << "
"; - out() << "
    \n"; + out() << "\n"; int i = 0; NodeList::ConstIterator m = section.members.begin(); @@ -2099,22 +2089,17 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela continue; } - if (twoColumn && i == (int) (section.members.count() + 1) / 2) - out() << "\n"; i++; ++m; } - out() << "\n"; - if (twoColumn) - out() << "\n
      \n"; - - out() << "
    • "; + out() << "
    "; if (style == CodeMarker::Accessors) out() << ""; generateSynopsis(*m, relative, marker, style); if (style == CodeMarker::Accessors) out() << ""; - out() << "\n"; + out() << "

    \n"; + out() << "
\n"; } if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { @@ -2129,7 +2114,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, const N { QList >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { - out() << "

  • "; + out() << "
  • "; out() << (*p).second << " "; if ((*p).second == 1) { out() << section.singularMember; @@ -2425,7 +2410,9 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*()" static const QString linkTag("link"); for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { + if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { + if (i != 0) + html += " "; i += 2; if (parseArg(src, linkTag, &i, n, &arg, &par1)) { QString link = linkForNode( -- cgit v0.12