diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-13 15:33:54 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-13 15:33:54 (GMT) |
commit | bb1b5345d7e81a0ee0695a2de0605b3ce3aef868 (patch) | |
tree | 2c705ff61b68d553c98be6085055958a669e765a /tools/qdoc3/htmlgenerator.cpp | |
parent | 28ef9731df2b3cd865af89cc474c5fa20c24e492 (diff) | |
parent | e3edb0f6f10d8ae25dad3e4dfe0026313dab8f39 (diff) | |
download | Qt-bb1b5345d7e81a0ee0695a2de0605b3ce3aef868.zip Qt-bb1b5345d7e81a0ee0695a2de0605b3ce3aef868.tar.gz Qt-bb1b5345d7e81a0ee0695a2de0605b3ce3aef868.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (51 commits)
Revert "qmake: pass include directories to MS resource compiler"
Fix User 46 Panic in bearer management on Symbian.
Assistant: Insert all keywords with empty ids, as ids are not mendatory.
qmake: delete .pdb file when making 'distclean' instead of 'clean'
qmake: pass include directories to MS resource compiler
use specified pkg-config
qmake/symbian: Add icons with backslashes in pkg files
Make qtconfig help messages translatable
remove exec bits again ...
Add TIFFClose to QTIffHandler::option() to avoid memory leak
[QCocoaView scrollWheel:] can end up recursing infinitely when a scrollWheel event is sent to two stacked MDI windows
Added missing QtWebKit example files and some whitespace fixes.
Added missing native separator transforms.
Doc: tuning search reasult box
qdoc: Don't generate html output for png files.
Doc: Correcting Windows CE 6.0 to Windows Embedded CE 6.0
Doc: correcting bug - lenght() pointed to setLength() in "See also" section. Correct link is resize()
Doc: correct spelling
Doc: correcting spelling - qdbusxml2dcpp to qdbusxml2cpp
Doc: correcting grammar on the installation pages
...
Diffstat (limited to 'tools/qdoc3/htmlgenerator.cpp')
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 128 |
1 files changed, 63 insertions, 65 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 77e306a..c804d09 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -451,7 +451,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, { int skipAhead = 0; static bool in_para = false; - + switch (atom->type()) { case Atom::AbstractLeft: break; @@ -527,18 +527,18 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE]; break; case Atom::Code: - out() << "<pre class=\"highlightedCode brush: cpp\">" + out() << "<pre class=\"highlightedCode brush: cpp\">" << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()), marker,relative)) << "</pre>\n"; - break; + break; #ifdef QDOC_QML case Atom::Qml: - out() << "<pre class=\"highlightedCode brush: cpp\">" + out() << "<pre class=\"highlightedCode brush: cpp\">" << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()), marker,relative)) << "</pre>\n"; - break; + break; #endif case Atom::CodeNew: out() << "<p>you can rewrite it as</p>\n" @@ -554,7 +554,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "<pre class=\"highlightedCode brush: cpp\">" << trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string())))) << "</pre>\n"; - break; + break; case Atom::FootnoteLeft: // ### For now if (in_para) { @@ -927,13 +927,12 @@ int HtmlGenerator::generateAtom(const Atom *atom, threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom); if (threeColumnEnumValueTable) { out() << "<table class=\"valuelist\">"; - // << "<tr>" - if (++numTableRows % 2 == 1) - out() << "<tr class=\"odd\">"; - else - out() << "<tr class=\"even\">"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; - out() << "<tr><th class=\"tblConst\">Constant</th>" + out() << "<th class=\"tblConst\">Constant</th>" << "<th class=\"tblval\">Value</th>" << "<th class=\"tbldscr\">Description</th></tr>\n"; } @@ -1811,44 +1810,44 @@ void HtmlGenerator::generateHeader(const QString& title, out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n"; out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; - - // Adding syntax highlighter // future release - + + // Adding syntax highlighter // future release + // Setting some additional style sheet related details depending on configuration (e.g. Online/Creator) switch (application) { case Online: // Adding style and js for small windows - out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />"; - out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n"; + out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n"; + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />"; + out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n"; + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n"; // Browser spec styles - out() << " <!--[if IE]>\n"; - out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n"; - out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n"; - out() << "<![endif]-->\n"; - out() << "<!--[if lt IE 7]>\n"; - out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n"; - out() << "<![endif]-->\n"; - out() << "<!--[if IE 7]>\n"; - out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n"; - out() << "<![endif]-->\n"; - out() << "<!--[if IE 8]>\n"; - out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n"; - out() << "<![endif]-->\n"; - - out() << "</head>\n"; - // CheckEmptyAndLoadList activating search - out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n"; + out() << " <!--[if IE]>\n"; + out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n"; + out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n"; + out() << "<![endif]-->\n"; + out() << "<!--[if lt IE 7]>\n"; + out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n"; + out() << "<![endif]-->\n"; + out() << "<!--[if IE 7]>\n"; + out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n"; + out() << "<![endif]-->\n"; + out() << "<!--[if IE 8]>\n"; + out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n"; + out() << "<![endif]-->\n"; + + out() << "</head>\n"; + // CheckEmptyAndLoadList activating search + out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n"; break; case Creator: - out() << "</head>\n"; - out() << "<body class=\"offline narrow creator\">\n"; // offline narrow + out() << "</head>\n"; + out() << "<body class=\"offline narrow creator\">\n"; // offline narrow break; default: - out() << "</head>\n"; - out() << "<body>\n"; + out() << "</head>\n"; + out() << "<body>\n"; break; } @@ -1866,7 +1865,7 @@ void HtmlGenerator::generateHeader(const QString& title, case Creator: out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); generateBreadCrumbs(title,node,marker); - out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); + out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); break; default: // default -- not used except if one forgets to set any of the above settings to true out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); @@ -1945,8 +1944,8 @@ void HtmlGenerator::generateTitle(const QString& title, if (!title.isEmpty()) out() << "<h1 class=\"title\">" << protectEnc(title) << "</h1>\n"; if (!subTitle.isEmpty()) { - out() << "<span"; - if (subTitleSize == SmallSubTitle) + out() << "<span"; + if (subTitleSize == SmallSubTitle) out() << " class=\"small-subtitle\">"; else out() << " class=\"subtitle\">"; @@ -1979,10 +1978,10 @@ void HtmlGenerator::generateFooter(const Node *node) out() << " })();\n"; out() << " </script>\n"; out() << "</body>\n"; - break; + break; case Creator: out() << "</body>\n"; - break; + break; default: out() << "</body>\n"; } @@ -2238,20 +2237,19 @@ void HtmlGenerator::generateNavigationBar(const NavigationBar& bar, out() << "</a>]\n"; #endif } - if (fake->name() != QString("index.html")) - { - if (bar.current.begin() != 0) { - out() << "[<a href=\"" << "home" - << ".html\">Home</a>]\n"; - } - if (bar.next.begin() != 0) { - out() << "[<a href=\"" << fileBase(node, bar.next) - << ".html\">Next: "; - generateText(Text::sectionHeading(bar.next.begin()), node, marker); - out() << "</a>]\n"; + if (fake->name() != QString("index.html")) { + if (bar.current.begin() != 0) { + out() << "[<a href=\"" << "home" + << ".html\">Home</a>]\n"; + } + if (bar.next.begin() != 0) { + out() << "[<a href=\"" << fileBase(node, bar.next) + << ".html\">Next: "; + generateText(Text::sectionHeading(bar.next.begin()), node, marker); + out() << "</a>]\n"; + } + out() << "</p>\n"; } - out() << "</p>\n"; - } } } #endif @@ -3283,7 +3281,7 @@ void HtmlGenerator::generateLink(const Atom* atom, inLink = false; out() << protectEnc(atom->string().mid(k)); } else if (marker->recognizeLanguage("Java")) { - // hack for Java: remove () and use <tt> when appropriate + // hack for Java: remove () and use <tt> when appropriate bool func = atom->string().endsWith("()"); bool tt = (func || atom->string().contains(camelCase)); if (tt) @@ -4065,7 +4063,7 @@ void HtmlGenerator::generateStatus(const Node *node, CodeMarker *marker) switch (node->status()) { case Node::Obsolete: if (node->isInnerNode()) - Generator::generateStatus(node, marker); + Generator::generateStatus(node, marker); break; case Node::Compat: if (node->isInnerNode()) { @@ -4225,7 +4223,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, out() << "<tr class=\"odd\">"; else out() << "<tr class=\"even\">"; - + out() << "<td class=\"tblQmlPropNode\"><p>"; out() << "<a name=\"" + refForNode(qpn) + "\"></a>"; @@ -4265,10 +4263,10 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, out() << "<div class=\"qmlproto\">"; out() << "<table class=\"qmlname\">"; //out() << "<tr>"; - if (++numTableRows % 2 == 1) - out() << "<tr class=\"odd\">"; - else - out() << "<tr class=\"even\">"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; out() << "<td class=\"tblQmlFuncNode\"><p>"; out() << "<a name=\"" + refForNode(qmn) + "\"></a>"; generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); |