summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/htmlgenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3/htmlgenerator.cpp')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 7702628..13d52bf 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -2079,7 +2079,17 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela
CodeMarker *marker, CodeMarker::SynopsisStyle style)
{
if (!section.members.isEmpty()) {
- out() << "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
+ 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() << "<p><table width=\"100%\" border=\"0\" cellpadding=\"0\""
+ " cellspacing=\"0\">\n"
+ << "<tr><td width=\"45%\" valign=\"top\">";
+ out() << "<ul>\n";
int i = 0;
NodeList::ConstIterator m = section.members.begin();
@@ -2089,17 +2099,22 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela
continue;
}
- out() << "<tr><td class=\"memItemLeft\" nowrap align=\"right\" valign=\"top\">";
+ if (twoColumn && i == (int) (section.members.count() + 1) / 2)
+ out() << "</ul></td><td valign=\"top\"><ul>\n";
+
+ out() << "<li><div class=\"fn\"></div>";
if (style == CodeMarker::Accessors)
out() << "<b>";
generateSynopsis(*m, relative, marker, style);
if (style == CodeMarker::Accessors)
out() << "</b>";
- out() << "</td></tr>\n";
+ out() << "</li>\n";
i++;
++m;
}
- out() << "</table>\n";
+ out() << "</ul>\n";
+ if (twoColumn)
+ out() << "</td></tr>\n</table></p>\n";
}
if (style == CodeMarker::Summary && !section.inherited.isEmpty()) {
@@ -2114,7 +2129,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, const N
{
QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin();
while (p != section.inherited.end()) {
- out() << "<li><div bar=2 class=\"fn\"></div>";
+ out() << "<li><div class=\"fn\"></div>";
out() << (*p).second << " ";
if ((*p).second == 1) {
out() << section.singularMember;
@@ -2410,9 +2425,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
// replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)"
static const QString linkTag("link");
for (int i = 0, n = src.size(); i < n;) {
- if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') {
- if (i != 0)
- html += "&nbsp;</td><td class=\"memItemRight\" valign=\"bottom\">";
+ if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
i += 2;
if (parseArg(src, linkTag, &i, n, &arg, &par1)) {
QString link = linkForNode(