diff -r 5dc02b23752f -r 3e2da88830cd tools/qdoc3/htmlgenerator.cpp --- a/tools/qdoc3/htmlgenerator.cpp Tue Jul 06 15:10:48 2010 +0300 +++ b/tools/qdoc3/htmlgenerator.cpp Wed Aug 18 10:37:55 2010 +0300 @@ -61,6 +61,13 @@ #define COMMAND_VERSION Doc::alias("version") int HtmlGenerator::id = 0; +bool HtmlGenerator::debugging_on = false; + +#if 0 +QString HtmlGenerator::divNavTop = "
"; +#endif + +QString HtmlGenerator::divNavTop = ""; QString HtmlGenerator::sinceTitles[] = { @@ -213,6 +220,7 @@ numTableRows(0), threeColumnEnumValueTable(true), offlineDocs(true), + creatorDocs(true), funcLeftParen("\\S(\\()"), myTree(0), slow(false), @@ -275,6 +283,7 @@ project = config.getString(CONFIG_PROJECT); offlineDocs = !config.getBool(CONFIG_ONLINE); + creatorDocs = false; //!config.getBool(CONFIG_CREATOR); projectDescription = config.getString(CONFIG_DESCRIPTION); if (projectDescription.isEmpty() && !project.isEmpty()) projectDescription = project + " Reference Documentation"; @@ -345,17 +354,6 @@ */ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) { -#if 0 - // Copy the stylesheets from the directory containing the qdocconf file. - // ### This should be changed to use a special directory in doc/src. - QStringList::ConstIterator styleIter = stylesheets.begin(); - QDir configPath = QDir::current(); - while (styleIter != stylesheets.end()) { - QString filePath = configPath.absoluteFilePath(*styleIter); - Config::copyFile(Location(), filePath, filePath, outputDir()); - ++styleIter; - } -#endif myTree = tree; nonCompatClasses.clear(); mainClasses.clear(); @@ -370,9 +368,6 @@ findAllFunctions(tree->root()); findAllLegaleseTexts(tree->root()); findAllNamespaces(tree->root()); -#ifdef ZZZ_QDOC_QML - findAllQmlClasses(tree->root()); -#endif findAllSince(tree->root()); PageGenerator::generateTree(tree, marker); @@ -434,13 +429,16 @@ sectionNumber.clear(); } +/*! + Generate html from an instance of Atom. + */ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker) { int skipAhead = 0; static bool in_para = false; - + switch (atom->type()) { case Atom::AbstractLeft: break; @@ -516,14 +514,14 @@ out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE]; break; case Atom::Code: - out() << "
"
+	out() << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                  marker,relative))
               << "
\n"; break; #ifdef QDOC_QML case Atom::Qml: - out() << "
"
+	out() << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                  marker,relative))
               << "
\n"; @@ -531,7 +529,7 @@ #endif case Atom::CodeNew: out() << "

you can rewrite it as

\n" - << "
"
+              << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                  marker,relative))
               << "
\n"; @@ -540,7 +538,7 @@ out() << "

For example, if you have code like

\n"; // fallthrough case Atom::CodeBad: - out() << "
"
+        out() << "
"
               << trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))
               << "
\n"; break; @@ -919,13 +917,13 @@ else out() << ""; - out() << "Constant" - << "Value" - << "Description\n"; + out() << "Constant" + << "Value" + << "Description\n"; } else { out() << "" - << "\n"; + << "\n"; } } else { @@ -1063,11 +1061,11 @@ } sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); } - out() << "\n"; + out() << "" << divNavTop << "\n"; } #else out() << "\n"; + << "\">" << divNavTop << "\n"; #endif break; case Atom::SectionRight: @@ -1139,9 +1137,9 @@ case Atom::TableItemLeft: { if (inTableHeader) - out() << "string().split(","); if (spans.size() == 2) { @@ -1217,6 +1215,9 @@ return skipAhead; } +/*! + Generate a reference page for a C++ class. + */ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, CodeMarker *marker) { @@ -1252,47 +1253,21 @@ subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" << Atom(Atom::LineBreak); -#if 0 - // No longer used because the modeule name is a breadcrumb. - QString fixedModule = inner->moduleName(); - if (fixedModule == "Qt3SupportLight") - fixedModule = "Qt3Support"; - if (!fixedModule.isEmpty()) - subtitleText << "[" << Atom(Atom::AutoLink, fixedModule) << " module]"; - - if (fixedModule.isEmpty()) { - QMultiMap publicGroups = myTree->publicGroups(); - QList groupNames = publicGroups.values(inner->name()); - if (!groupNames.isEmpty()) { - qSort(groupNames.begin(), groupNames.end()); - subtitleText << "["; - for (int j=0; jsections(inner, CodeMarker::Summary, CodeMarker::Okay); generateTableOfContents(inner,marker,§ions); - generateTitle(title, subtitleText, SmallSubTitle, inner, marker); - -#ifdef QDOC_QML - if (classe && !classe->qmlElement().isEmpty()) { - generateInstantiatedBy(classe,marker); - } -#endif - + generateTitle(title, subtitleText, SmallSubTitle, inner, marker); generateBrief(inner, marker); generateIncludes(inner, marker); generateStatus(inner, marker); if (classe) { generateInherits(classe, marker); generateInheritedBy(classe, marker); +#ifdef QDOC_QML + if (!classe->qmlElement().isEmpty()) { + generateInstantiatedBy(classe,marker); + } +#endif } generateThreadSafeness(inner, marker); generateSince(inner, marker); @@ -1333,26 +1308,26 @@ } else { if (!s->members.isEmpty()) { - out() << "
\n"; + // out() << "
\n"; out() << "\n"; + << "\">" << divNavTop << "\n"; out() << "

" << protectEnc((*s).name) << "

\n"; generateSection(s->members, inner, marker, CodeMarker::Summary); } if (!s->reimpMembers.isEmpty()) { QString name = QString("Reimplemented ") + (*s).name; - out() << "
\n"; + // out() << "
\n"; out() << "\n"; + << "\">" << divNavTop << "\n"; out() << "

" << protectEnc(name) << "

\n"; generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); } if (!s->inherited.isEmpty()) { out() << "
    \n"; - generateSectionInheritedList(*s, inner, marker, true); + generateSectionInheritedList(*s, inner, marker); out() << "
\n"; } } @@ -1372,23 +1347,25 @@ out() << "\n"; } - out() << "\n"; + out() << "" << divNavTop << "\n"; if (!inner->doc().isEmpty()) { - out() << "
\n" - << "
\n" // QTBUG-9504 + generateExtractionMark(inner, DetailedDescriptionMark); + //out() << "
\n" + out() << "
\n" // QTBUG-9504 << "

" << "Detailed Description" << "

\n"; generateBody(inner, marker); out() << "
\n"; // QTBUG-9504 generateAlsoList(inner, marker); + generateExtractionMark(inner, EndMark); } sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { - out() << "
\n"; + //out() << "
\n"; if (!(*s).divClass.isEmpty()) - out() << "
\n"; // QTBUG-9504 + out() << "
\n"; // QTBUG-9504 out() << "

" << protectEnc((*s).name) << "

\n"; NodeList::ConstIterator m = (*s).members.begin(); @@ -1466,6 +1443,10 @@ appendDcfSubSection(&dcfClassesRoot, classSection); } +/*! + Generate the html page for a qdoc file that doesn't map + to an underlying c++ file. + */ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) { SubTitleSize subTitleSize = LargeSubTitle; @@ -1493,7 +1474,13 @@ Generate the TOC for the new doc format. Don't generate a TOC for the home page. */ - if (fake->name() != QString("index.html")) + const QmlClassNode* qml_cn = 0; + if (fake->subType() == Node::QmlClass) { + qml_cn = static_cast(fake); + sections = marker->qmlSections(qml_cn,CodeMarker::Summary); + generateTableOfContents(fake,marker,§ions); + } + else if (fake->name() != QString("index.html")) generateTableOfContents(fake,marker,0); generateTitle(fullTitle, @@ -1508,12 +1495,12 @@ generateStatus(fake, marker); if (moduleNamespaceMap.contains(fake->name())) { - out() << "\n"; + out() << "" << divNavTop << "\n"; out() << "

Namespaces

\n"; generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]); } if (moduleClassMap.contains(fake->name())) { - out() << "\n"; + out() << "" << divNavTop << "\n"; out() << "

Classes

\n"; generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]); } @@ -1567,28 +1554,29 @@ } #ifdef QDOC_QML else if (fake->subType() == Node::QmlClass) { - const QmlClassNode* qml_cn = static_cast(fake); const ClassNode* cn = qml_cn->classNode(); + generateBrief(qml_cn, marker); generateQmlInherits(qml_cn, marker); + generateQmlInheritedBy(qml_cn, marker); generateQmlInstantiates(qml_cn, marker); - generateBrief(qml_cn, marker); - generateQmlInheritedBy(qml_cn, marker); - sections = marker->qmlSections(qml_cn,CodeMarker::Summary); s = sections.begin(); while (s != sections.end()) { - out() << "\n"; + out() << "" << divNavTop << "\n"; out() << "

" << protectEnc((*s).name) << "

\n"; generateQmlSummary(*s,fake,marker); ++s; } - out() << "\n"; + generateExtractionMark(fake, DetailedDescriptionMark); + out() << "" << divNavTop << "\n"; out() << "

" << "Detailed Description" << "

\n"; generateBody(fake, marker); if (cn) generateQmlText(cn->doc().body(), cn, marker, fake->name()); generateAlsoList(fake, marker); - out() << "
\n"; + generateExtractionMark(fake, EndMark); + //out() << "
\n"; sections = marker->qmlSections(qml_cn,CodeMarker::Detailed); s = sections.begin(); @@ -1612,7 +1600,7 @@ sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { - out() << "\n"; + out() << "" << divNavTop << "\n"; out() << "

" << protectEnc((*s).name) << "

\n"; generateSectionList(*s, fake, marker, CodeMarker::Summary); ++s; @@ -1620,16 +1608,20 @@ Text brief = fake->doc().briefText(); if (fake->subType() == Node::Module && !brief.isEmpty()) { - out() << "\n"; - out() << "
\n"; // QTBUG-9504 + generateExtractionMark(fake, DetailedDescriptionMark); + out() << "" << divNavTop << "\n"; + out() << "
\n"; // QTBUG-9504 out() << "

" << "Detailed Description" << "

\n"; } - else - out() << "
\n"; // QTBUG-9504 + else { + generateExtractionMark(fake, DetailedDescriptionMark); + out() << "
\n"; // QTBUG-9504 + } generateBody(fake, marker); out() << "
\n"; // QTBUG-9504 generateAlsoList(fake, marker); + generateExtractionMark(fake, EndMark); if (!fake->groupMembers().isEmpty()) { NodeMap groupMembersMap; @@ -1645,7 +1637,7 @@ sections = marker->sections(fake, CodeMarker::Detailed, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { - out() << "
\n"; + //out() << "
\n"; out() << "

" << protectEnc((*s).name) << "

\n"; NodeList::ConstIterator m = (*s).members.begin(); @@ -1682,6 +1674,9 @@ } } +/*! + Returns "html" for this subclass of Generator. + */ QString HtmlGenerator::fileExtension(const Node * /* node */) const { return "html"; @@ -1698,80 +1693,68 @@ if (node->type() == Node::Class) { const ClassNode* cn = static_cast(node); QString name = node->moduleName(); - out() << "
  • All Modules
  • "; + out() << "
  • Modules
  • "; if (!name.isEmpty()) { out() << "
  • "; breadcrumb << Atom(Atom::AutoLink,name); generateText(breadcrumb, node, marker); out() << "
  • \n"; } - breadcrumb.clear(); - if (!cn->name().isEmpty()) { - out() << "
  • "; - breadcrumb << Atom(Atom::AutoLink,cn->name()); - generateText(breadcrumb, 0, marker); - out() << "
  • \n"; - } + if (!cn->name().isEmpty()) + out() << "
  • " << cn->name() << "
  • \n"; } else if (node->type() == Node::Fake) { const FakeNode* fn = static_cast(node); if (node->subType() == Node::Module) { - out() << "
  • All Modules
  • "; + out() << "
  • Modules
  • "; QString name = node->name(); - if (!name.isEmpty()) { - out() << "
  • "; - breadcrumb << Atom(Atom::AutoLink,name); - generateText(breadcrumb, 0, marker); - out() << "
  • \n"; - } + if (!name.isEmpty()) + out() << "
  • " << name << "
  • \n"; } else if (node->subType() == Node::Group) { if (fn->name() == QString("modules")) - out() << "
  • All Modules
  • "; + out() << "
  • Modules
  • "; else { - out() << "
  • name() << "\">" << title - << "
  • "; + out() << "
  • " << title << "
  • "; } } else if (node->subType() == Node::Page) { - if (fn->name() == QString("examples.html")) { - out() << "
  • All Examples
  • "; + if (fn->name() == QString("qdeclarativeexamples.html")) { + out() << "
  • Examples
  • "; + out() << "
  • QML Examples & Demos
  • "; } else if (fn->name().startsWith("examples-")) { - out() << "
  • All Examples
  • "; - out() << "
  • name() << "\">" << title - << "
  • "; + out() << "
  • Examples
  • "; + out() << "
  • " << title << "
  • "; } else if (fn->name() == QString("namespaces.html")) { - out() << "
  • All Namespaces
  • "; + out() << "
  • Namespaces
  • "; } else { - out() << "
  • name() << "\">" << title - << "
  • "; + out() << "
  • " << title << "
  • "; } } else if (node->subType() == Node::QmlClass) { out() << "
  • QML Elements
  • "; - out() << "
  • name() << "\">" << title - << "
  • "; + out() << "
  • " << title << "
  • "; } else if (node->subType() == Node::Example) { - out() << "
  • All Examples
  • "; + out() << "
  • Examples
  • "; QStringList sl = fn->name().split('/'); - QString name = "examples-" + sl.at(0) + ".html"; - QString t = CodeParser::titleFromName(name); - out() << "
  • " - << t << "
  • "; - out() << "
  • " - << title << "
  • "; + if (sl.contains("declarative")) + out() << "
  • QML Examples & Demos
  • "; + else { + QString name = "examples-" + sl.at(0) + ".html"; + QString t = CodeParser::titleFromName(name); + out() << "
  • " + << t << "
  • "; + } + out() << "
  • " << title << "
  • "; } } else if (node->type() == Node::Namespace) { - const NamespaceNode* nsn = static_cast(node); - out() << "
  • All Namespaces
  • "; - out() << "
  • " << title - << "
  • "; + out() << "
  • Namespaces
  • "; + out() << "
  • " << title << "
  • "; } } @@ -1781,7 +1764,7 @@ { out() << QString("\n").arg(outputEncoding); out() << "\n"; - out() << "\n"; + out() << QString("\n").arg(naturalLanguage); out() << "\n"; out() << " \n"; QString shortVersion; @@ -1798,34 +1781,56 @@ else shortVersion = "Qt " + shortVersion + ": "; } - + // Generating page title out() << " " << shortVersion << protectEnc(title) << "\n"; - - out() << " "; - out() << ""; - out() << ""; - out() << ""; - - - //out() << " Qt Reference Documentation"; - out() << " \n"; - out() << " \n"; - out() << " \n"; - out() << "\n"; - + // Adding style sheet + out() << " "; + // Adding jquery and functions - providing online tools and search features + out() << " \n"; + out() << " \n"; + // Adding style and js for small windows + out() << " \n"; + out() << " "; + out() << " \n"; + out() << " "; + + // Adding syntax highlighter // future release + + // Setting assistant configuration if (offlineDocs) - out() << "\n"; + { + out() << " "; // Only for Qt Creator + out() << "\n"; + out() << "\n"; // offline for Assistant + } + if (creatorDocs) + { + out() << " "; // Only for Qt Creator + out() << "\n"; + out() << "\n"; // offline for Creator + } + // Setting online doc configuration else - out() << "\n"; + { + // Browser spec styles + out() << " \n"; + out() << "\n"; + out() << "\n"; + out() << "\n"; + + out() << "\n"; + // CheckEmptyAndLoadList activating search + out() << "\n"; + } #ifdef GENERATE_MAC_REFS if (mainPage) @@ -1835,7 +1840,7 @@ generateBreadCrumbs(title,node,marker); out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); -#if 0 // Removed for new docf format. MWS +#if 0 // Removed for new doc format. MWS if (node && !node->links().empty()) out() << "

    \n" << navigationLinks << "

    \n"; #endif @@ -1867,8 +1872,30 @@ out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version()) << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()); - out() << " \n"; + + if (offlineDocs) + { + out() << "\n"; + } + if (creatorDocs) + { out() << "\n"; + } + else + { + out() << " \n"; + out() << " \n"; + out() << "\n"; + } out() << "\n"; } @@ -1877,6 +1904,7 @@ { Text brief = node->doc().briefText(); if (!brief.isEmpty()) { + generateExtractionMark(node, BriefMark); out() << "

    "; generateText(brief, node, marker); if (!relative || node == relative) @@ -1884,13 +1912,14 @@ else out() << " More...

    \n"; + generateExtractionMark(node, EndMark); } } void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { - out() << "
    "
    +        out() << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,
                                                             marker->markedUpIncludes(inner->includes())),
                                                      marker,inner))
    @@ -2005,7 +2034,7 @@
         inLink = true;
     
         out() << "
    \n"; - out() << "

    Contents

    \n"; + out() << "

    Contents

    \n"; sectionNumber.append("1"); out() << "
      \n"; @@ -2036,7 +2065,9 @@ } } } - else if (sections && (node->type() == Node::Class)) { + else if (sections && ((node->type() == Node::Class) || + (node->type() == Node::Namespace) || + (node->subType() == Node::QmlClass))) { QList
      ::ConstIterator s = sections->begin(); while (s != sections->end()) { if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) { @@ -2114,6 +2145,8 @@ out() << "]\n"; #endif } + if (fake->name() != QString("index.html")) + { if (bar.current.begin() != 0) { out() << "[Home]\n"; @@ -2125,6 +2158,7 @@ out() << "]\n"; } out() << "

      \n"; + } } } #endif @@ -2215,7 +2249,7 @@ sections = marker->sections(inner, CodeMarker::Detailed, status); for (i = 0; i < sections.size(); ++i) { - out() << "
      \n"; + //out() << "
      \n"; out() << "

      " << protectEnc(sections.at(i).name) << "

      \n"; NodeList::ConstIterator m = sections.at(i).members.begin(); @@ -2294,20 +2328,20 @@ out() << "
    "; else out() << ""; - out() << ""; if (!(node->type() == Node::Fake)) { Text brief = node->doc().trimmedBriefText(name); if (!brief.isEmpty()) { - out() << ""; } } else { - out() << ""; } @@ -2332,7 +2366,6 @@ QString commonPrefix) { const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_' - const int NumColumns = 3; // number of columns in the result if (classMap.isEmpty()) return; @@ -2415,18 +2448,18 @@ else key = pieces.last().toLower(); - int paragraphNo = NumParagraphs - 1; + int paragraphNr = NumParagraphs - 1; if (key[0].digitValue() != -1) { - paragraphNo = key[0].digitValue(); + paragraphNr = key[0].digitValue(); } else if (key[0] >= QLatin1Char('a') && key[0] <= QLatin1Char('z')) { - paragraphNo = 10 + key[0].unicode() - 'a'; + paragraphNr = 10 + key[0].unicode() - 'a'; } - paragraphName[paragraphNo] = key[0].toUpper(); + paragraphName[paragraphNr] = key[0].toUpper(); usedParagraphNames.insert(key[0].toLower().cell()); - paragraph[paragraphNo].insert(key, c.value()); + paragraph[paragraphNr].insert(key, c.value()); ++c; } @@ -2439,36 +2472,16 @@ start at offsets 0, 3, 4, 8, 9, 14, 23. */ int paragraphOffset[NumParagraphs + 1]; // 37 + 1 - int i, j, k; - paragraphOffset[0] = 0; - 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 numRows = (classMap.count() + NumColumns - 1) / NumColumns; - int curParagNo = 0; - - for (i = 0; i < NumColumns; i++) { - firstOffset[i] = qMin(i * numRows, classMap.size()); - currentOffset[i] = firstOffset[i]; - - for (j = curParagNo; j < NumParagraphs; j++) { - if (paragraphOffset[j] > firstOffset[i]) - break; - if (paragraphOffset[j] <= firstOffset[i]) - curParagNo = j; - } - currentParagraphNo[i] = curParagNo; - currentOffsetInParagraph[i] = firstOffset[i] - - paragraphOffset[curParagNo]; - } - firstOffset[NumColumns] = classMap.count(); - + for (int i=0; i"; for (int i = 0; i < 26; i++) { @@ -2479,81 +2492,74 @@ out() << "

    \n"; } - out() << "
    ConstantValue
    ConstantValue

    "; + out() << "

    "; generateFullName(node, relative, marker); out() << "

    "; + out() << "

    "; generateText(brief, node, marker); out() << "

    "; + out() << "

    "; out() << protectEnc(node->doc().briefText().toString()); out() << "

    \n"; - for (k = 0; k < numRows; k++) { - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - //break; - -// out() << "\n"; - for (i = 0; i < NumColumns; i++) { - if (currentOffset[i] >= firstOffset[i + 1]) { - // this column is finished - out() << "\n"; // check why? + /* + Output a
    element to contain all the
    elements. + */ + out() << "
    \n"; + + for (int i=0; i. + */ + if (curParOffset == 0) { + if (i > 0) + out() << "
    \n"; + if (++numTableRows % 2 == 1) + out() << "
    "; + else + out() << "
    "; + out() << "
    "; + if (includeAlphabet) { + QChar c = paragraphName[curParNr][0].toLower(); + out() << QString("").arg(c); } - else { - 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() << "
    \n"; - - out() << "\n"; - - currentOffset[i]++; - currentOffsetInParagraph[i]++; + out() << "" + << paragraphName[curParNr] + << ""; + out() << "\n"; + } + + /* + Output a
    for the current offset in the current paragraph. + */ + out() << "
    "; + if ((curParNr < NumParagraphs) && + !paragraphName[curParNr].isEmpty()) { + NodeMap::Iterator it; + it = paragraph[curParNr].begin(); + for (int i=0; i"; + + QStringList pieces; + if (it.value()->subType() == Node::QmlClass) + pieces << it.value()->name(); + else + pieces = fullName(it.value(), relative, marker).split("::"); + out() << protectEnc(pieces.last()); + out() << ""; + if (pieces.size() > 1) { + out() << " ("; + generateFullName(it.value()->parent(), relative, marker); + out() << ")"; } } - out() << "
    \n"; + out() << "\n"; + curParOffset++; } - out() << "
    \n

    "; - if (currentOffsetInParagraph[i] == 0) { - // start a new paragraph - if (includeAlphabet) { - QChar c = paragraphName[currentParagraphNo[i]][0].toLower(); - out() << QString("").arg(c); - } - out() << "" - << paragraphName[currentParagraphNo[i]] - << ""; - } - out() << "

    "; - if ((currentParagraphNo[i] < NumParagraphs) && - !paragraphName[currentParagraphNo[i]].isEmpty()) { - NodeMap::Iterator it; - it = paragraph[currentParagraphNo[i]].begin(); - for (j = 0; j < currentOffsetInParagraph[i]; j++) - ++it; - - // Previously, we used generateFullName() for this, but we - // require some special formatting. - out() << ""; - QStringList pieces; - if (it.value()->subType() == Node::QmlClass) - pieces << it.value()->name(); - else - pieces = fullName(it.value(), relative, marker).split("::"); - out() << protectEnc(pieces.last()); - out() << ""; - if (pieces.size() > 1) { - out() << " ("; - generateFullName(it.value()->parent(), relative, marker); - out() << ")"; - } - } - out() << "

    \n"; + out() << "\n"; + out() << "\n"; } void HtmlGenerator::generateFunctionIndex(const Node *relative, @@ -2612,7 +2618,7 @@ QMap::ConstIterator it = legaleseTexts.begin(); while (it != legaleseTexts.end()) { Text text = it.key(); - out() << "
    \n"; + //out() << "
    \n"; generateText(text, relative, marker); out() << "
      \n"; do { @@ -2625,44 +2631,6 @@ } } -/*void HtmlGenerator::generateSynopsis(const Node *node, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style) -{ - QString marked = marker->markedUpSynopsis(node, relative, style); - QRegExp templateTag("(<[^@>]*>)"); - if (marked.indexOf(templateTag) != -1) { - QString contents = protectEnc(marked.mid(templateTag.pos(1), - templateTag.cap(1).length())); - marked.replace(templateTag.pos(1), templateTag.cap(1).length(), - contents); - } - marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])"), - "\\1\\2"); - marked.replace("<@param>", ""); - marked.replace("", ""); - - if (style == CodeMarker::Summary) - marked.replace("@name>", "b>"); - - if (style == CodeMarker::SeparateList) { - QRegExp extraRegExp("<@extra>.*"); - extraRegExp.setMinimal(true); - marked.replace(extraRegExp, ""); - } - else { - marked.replace("<@extra>", "  "); - marked.replace("", ""); - } - - if (style != CodeMarker::Detailed) { - marked.replace("<@type>", ""); - marked.replace("", ""); - } - out() << highlightedCode(marked, marker, relative); -}*/ - #ifdef QDOC_QML void HtmlGenerator::generateQmlItem(const Node *node, const Node *relative, @@ -2692,7 +2660,7 @@ marked.replace("<@type>", ""); marked.replace("", ""); } - out() << highlightedCode(marked, marker, relative); + out() << highlightedCode(marked, marker, relative, false, node); } #endif @@ -2810,24 +2778,23 @@ } } -#ifdef QDOC_NAME_ALIGNMENT void HtmlGenerator::generateSection(const NodeList& nl, const Node *relative, CodeMarker *marker, CodeMarker::SynopsisStyle style) { - bool name_alignment = true; + bool alignNames = true; if (!nl.isEmpty()) { bool twoColumn = false; if (style == CodeMarker::SeparateList) { - name_alignment = false; + alignNames = false; twoColumn = (nl.count() >= 16); } else if (nl.first()->type() == Node::Property) { twoColumn = (nl.count() >= 5); - name_alignment = false; + alignNames = false; } - if (name_alignment) { + if (alignNames) { out() << "\n"; } else { @@ -2845,7 +2812,7 @@ continue; } - if (name_alignment) { + if (alignNames) { out() << "\n"; else out() << "\n"; i++; ++m; } - if (name_alignment) + if (alignNames) out() << "
      "; } else { @@ -2854,15 +2821,15 @@ out() << "
    • "; } - generateSynopsis(*m, relative, marker, style, name_alignment); - if (name_alignment) + generateSynopsis(*m, relative, marker, style, alignNames); + if (alignNames) out() << "
    • \n"; else { out() << "
    \n"; @@ -2877,18 +2844,18 @@ CodeMarker *marker, CodeMarker::SynopsisStyle style) { - bool name_alignment = true; + bool alignNames = true; if (!section.members.isEmpty()) { bool twoColumn = false; if (style == CodeMarker::SeparateList) { - name_alignment = false; + alignNames = false; twoColumn = (section.members.count() >= 16); } else if (section.members.first()->type() == Node::Property) { twoColumn = (section.members.count() >= 5); - name_alignment = false; + alignNames = false; } - if (name_alignment) { + if (alignNames) { out() << "\n"; } else { @@ -2906,7 +2873,7 @@ continue; } - if (name_alignment) { + if (alignNames) { out() << "\n"; else out() << "\n"; i++; ++m; } - if (name_alignment) + if (alignNames) out() << "
    "; } else { @@ -2915,15 +2882,15 @@ out() << "
  • "; } - generateSynopsis(*m, relative, marker, style, name_alignment); - if (name_alignment) + generateSynopsis(*m, relative, marker, style, alignNames); + if (alignNames) out() << "
  • \n"; else { out() << "\n"; @@ -2934,22 +2901,18 @@ if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { out() << "
      \n"; - generateSectionInheritedList(section, relative, marker, name_alignment); + generateSectionInheritedList(section, relative, marker); out() << "
    \n"; } } void HtmlGenerator::generateSectionInheritedList(const Section& section, const Node *relative, - CodeMarker *marker, - bool nameAlignment) + CodeMarker *marker) { QList >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { - if (nameAlignment) - out() << "
  • "; - else - out() << "
  • "; + out() << "
  • "; out() << (*p).second << " "; if ((*p).second == 1) { out() << section.singularMember; @@ -2969,7 +2932,7 @@ const Node *relative, CodeMarker *marker, CodeMarker::SynopsisStyle style, - bool nameAlignment) + bool alignNames) { QString marked = marker->markedUpSynopsis(node, relative, style); QRegExp templateTag("(<[^@>]*>)"); @@ -3002,14 +2965,14 @@ marked.replace("<@type>", ""); marked.replace("", ""); } - out() << highlightedCode(marked, marker, relative, style, nameAlignment); + out() << highlightedCode(marked, marker, relative, alignNames); } QString HtmlGenerator::highlightedCode(const QString& markedCode, - CodeMarker *marker, - const Node *relative, - CodeMarker::SynopsisStyle , - bool nameAlignment) + CodeMarker* marker, + const Node* relative, + bool alignNames, + const Node* self) { QString src = markedCode; QString html; @@ -3019,20 +2982,24 @@ const QChar charLangle = '<'; const QChar charAt = '@'; + static const QString typeTag("type"); + static const QString headerTag("headerfile"); + static const QString funcTag("func"); + static const QString linkTag("link"); + // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*()" - static const QString linkTag("link"); bool done = false; - for (int i = 0, n = src.size(); i < n;) { + for (int i = 0, srcSize = src.size(); i < srcSize;) { if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { - if (nameAlignment && !done) {// && (i != 0)) Why was this here? + if (alignNames && !done) {// && (i != 0)) Why was this here? html += ""; done = true; } i += 2; - if (parseArg(src, linkTag, &i, n, &arg, &par1)) { + if (parseArg(src, linkTag, &i, srcSize, &arg, &par1)) { html += ""; - QString link = linkForNode( - CodeMarker::nodeForString(par1.toString()), relative); + const Node* n = CodeMarker::nodeForString(par1.toString()); + QString link = linkForNode(n, relative); addLink(link, arg, &html); html += ""; } @@ -3052,16 +3019,14 @@ // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)()" src = html; html = QString(); - static const QString funcTag("func"); - for (int i = 0, n = src.size(); i < n;) { + for (int i = 0, srcSize = src.size(); i < srcSize;) { if (src.at(i) == charLangle && src.at(i + 1) == charAt) { i += 2; - if (parseArg(src, funcTag, &i, n, &arg, &par1)) { - QString link = linkForNode( - marker->resolveTarget(par1.toString(), - myTree, - relative), - relative); + if (parseArg(src, funcTag, &i, srcSize, &arg, &par1)) { + const Node* n = marker->resolveTarget(par1.toString(), + myTree, + relative); + QString link = linkForNode(n, relative); addLink(link, arg, &html); par1 = QStringRef(); } @@ -3079,22 +3044,30 @@ // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()" tags src = html; html = QString(); - static const QString typeTags[] = { "type", "headerfile", "func" }; - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { + + for (int i=0, srcSize=src.size(); iresolveTarget(arg.toString(), myTree, relative), - relative); - addLink(link, arg, &html); - handled = true; - break; - } + if (parseArg(src, typeTag, &i, srcSize, &arg, &par1)) { + par1 = QStringRef(); + const Node* n = marker->resolveTarget(arg.toString(), myTree, relative, self); + addLink(linkForNode(n,relative), arg, &html); + handled = true; } + else if (parseArg(src, headerTag, &i, srcSize, &arg, &par1)) { + par1 = QStringRef(); + const Node* n = marker->resolveTarget(arg.toString(), myTree, relative); + addLink(linkForNode(n,relative), arg, &html); + handled = true; + } + else if (parseArg(src, funcTag, &i, srcSize, &arg, &par1)) { + par1 = QStringRef(); + const Node* n = marker->resolveTarget(arg.toString(), myTree, relative); + addLink(linkForNode(n,relative), arg, &html); + handled = true; + } + if (!handled) { html += charLangle; html += charAt; @@ -3122,22 +3095,6 @@ "","", "", "", "", "" - // "<@char>", "", - // "", "", - // "<@func>", "", - // "", "", - // "<@id>", "", - // "", "", - // "<@keyword>", "", - // "", "", - // "<@number>", "", - // "", "", - // "<@op>", "", - // "", "", - // "<@param>", "", - // "", "", - // "<@string>", "", - // "", "", }; for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle) { @@ -3175,281 +3132,6 @@ return html; } -#else -void HtmlGenerator::generateSectionList(const Section& section, - const Node *relative, - 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"; - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - -// << "\n
    "; - out() << "
      \n"; - - int i = 0; - NodeList::ConstIterator m = section.members.begin(); - while (m != section.members.end()) { - if ((*m)->access() == Node::Private) { - ++m; - continue; - } - - if (twoColumn && i == (int) (section.members.count() + 1) / 2) - out() << "
      \n"; - - out() << "
    • "; - if (style == CodeMarker::Accessors) - out() << ""; - generateSynopsis(*m, relative, marker, style); - if (style == CodeMarker::Accessors) - out() << ""; - out() << "
    • \n"; - i++; - ++m; - } - out() << "
    \n"; - if (twoColumn) - out() << "
    \n"; - } - - if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { - out() << "
      \n"; - generateSectionInheritedList(section, relative, marker); - out() << "
    \n"; - } -} - -void HtmlGenerator::generateSectionInheritedList(const Section& section, - const Node *relative, - CodeMarker *marker) -{ - QList >::ConstIterator p = section.inherited.begin(); - while (p != section.inherited.end()) { - out() << "
  • "; - out() << (*p).second << " "; - if ((*p).second == 1) { - out() << section.singularMember; - } else { - out() << section.pluralMember; - } - out() << " inherited from " - << protectEnc(marker->plainFullName((*p).first, relative)) - << "
  • \n"; - ++p; - } -} - -void HtmlGenerator::generateSynopsis(const Node *node, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style) -{ - QString marked = marker->markedUpSynopsis(node, relative, style); - QRegExp templateTag("(<[^@>]*>)"); - if (marked.indexOf(templateTag) != -1) { - QString contents = protectEnc(marked.mid(templateTag.pos(1), - templateTag.cap(1).length())); - marked.replace(templateTag.pos(1), templateTag.cap(1).length(), - contents); - } - marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])"), "\\1\\2"); - marked.replace("<@param>", ""); - marked.replace("", ""); - - if (style == CodeMarker::Summary) - marked.replace("@name>", "b>"); - - if (style == CodeMarker::SeparateList) { - QRegExp extraRegExp("<@extra>.*"); - extraRegExp.setMinimal(true); - marked.replace(extraRegExp, ""); - } else { - marked.replace("<@extra>", ""); - marked.replace("", ""); - } - - if (style != CodeMarker::Detailed) { - marked.replace("<@type>", ""); - marked.replace("", ""); - } - out() << highlightedCode(marked, marker, relative); -} - -QString HtmlGenerator::highlightedCode(const QString& markedCode, - CodeMarker *marker, - const Node *relative) -{ - QString src = markedCode; - QString html; - QStringRef arg; - QStringRef par1; - - const QChar charLangle = '<'; - const QChar charAt = '@'; - - // 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) { - i += 2; - if (parseArg(src, linkTag, &i, n, &arg, &par1)) { - const Node* node = CodeMarker::nodeForString(par1.toString()); - QString link = linkForNode(node, relative); - addLink(link, arg, &html); - } - else { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - - if (slow) { - // is this block ever used at all? - // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)()" - src = html; - html = QString(); - static const QString funcTag("func"); - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { - i += 2; - if (parseArg(src, funcTag, &i, n, &arg, &par1)) { - QString link = linkForNode( - marker->resolveTarget(par1.toString(), - myTree, - relative), - relative); - addLink(link, arg, &html); - par1 = QStringRef(); - } - else { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - } - - // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()" tags - src = html; - html = QString(); - static const QString typeTags[] = { "type", "headerfile", "func" }; - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { - i += 2; - bool handled = false; - for (int k = 0; k != 3; ++k) { - if (parseArg(src, typeTags[k], &i, n, &arg, &par1)) { - par1 = QStringRef(); - QString link = linkForNode( - marker->resolveTarget(arg.toString(), myTree, relative), - relative); - addLink(link, arg, &html); - handled = true; - break; - } - } - if (!handled) { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - - // replace all - // "<@comment>" -> ""; - // "<@preprocessor>" -> ""; - // "<@string>" -> ""; - // "<@char>" -> ""; - // "" -> "" - src = html; - html = QString(); - static const QString spanTags[] = { - "<@comment>", "", - "<@preprocessor>", "", - "<@string>", "", - "<@char>", "", - "", "", - "","", - "", "", - "", "" - // "<@char>", "", - // "", "", - // "<@func>", "", - // "", "", - // "<@id>", "", - // "", "", - // "<@keyword>", "", - // "", "", - // "<@number>", "", - // "", "", - // "<@op>", "", - // "", "", - // "<@param>", "", - // "", "", - // "<@string>", "", - // "", "", - }; - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle) { - bool handled = false; - for (int k = 0; k != 8; ++k) { - const QString & tag = spanTags[2 * k]; - if (tag == QStringRef(&src, i, tag.length())) { - html += spanTags[2 * k + 1]; - i += tag.length(); - handled = true; - break; - } - } - if (!handled) { - ++i; - if (src.at(i) == charAt || - (src.at(i) == QLatin1Char('/') && src.at(i + 1) == charAt)) { - // drop 'our' unknown tags (the ones still containing '@') - while (i < n && src.at(i) != QLatin1Char('>')) - ++i; - ++i; - } - else { - // retain all others - html += charLangle; - } - } - } - else { - html += src.at(i); - ++i; - } - } - - return html; -} -#endif - void HtmlGenerator::generateLink(const Atom* atom, const Node* /* relative */, CodeMarker* marker) @@ -3800,6 +3482,7 @@ #ifdef GENERATE_MAC_REFS generateMacRef(node, marker); #endif + generateExtractionMark(node, MemberMark); if (node->type() == Node::Enum && (enume = static_cast(node))->flagsType()) { #ifdef GENERATE_MAC_REFS @@ -3819,7 +3502,7 @@ out() << "

    "; out() << ""; generateSynopsis(node, relative, marker, CodeMarker::Detailed); - out() << "

    \n"; + out() << "" << divNavTop << "\n"; } generateStatus(node, marker); @@ -3862,6 +3545,7 @@ } } generateAlsoList(node, marker); + generateExtractionMark(node, EndMark); } void HtmlGenerator::findAllClasses(const InnerNode *node) @@ -3975,13 +3659,6 @@ } } -#if 0 - const QRegExp versionSeparator("[\\-\\.]"); - const int minorIndex = version.indexOf(versionSeparator); - const int patchIndex = version.indexOf(versionSeparator, minorIndex+1); - version = version.left(patchIndex); -#endif - void HtmlGenerator::findAllFunctions(const InnerNode *node) { NodeList::ConstIterator c = node->childNodes().begin(); @@ -4045,29 +3722,6 @@ } } -#ifdef ZZZ_QDOC_QML -/*! - This function finds all the qml element nodes and - stores them in a map for later use. - */ -void HtmlGenerator::findAllQmlClasses(const InnerNode *node) -{ - NodeList::const_iterator c = node->childNodes().constBegin(); - while (c != node->childNodes().constEnd()) { - if ((*c)->type() == Node::Fake) { - const FakeNode* fakeNode = static_cast(*c); - if (fakeNode->subType() == Node::QmlClass) { - const QmlClassNode* qmlNode = - static_cast(fakeNode); - const Node* n = qmlNode->classNode(); - } - qmlClasses.insert(fakeNode->name(),*c); - } - ++c; - } -} -#endif - int HtmlGenerator::hOffset(const Node *node) { switch (node->type()) { @@ -4075,10 +3729,7 @@ case Node::Class: return 2; case Node::Fake: - if (node->doc().briefText().isEmpty()) - return 1; - else - return 2; + return 1; case Node::Enum: case Node::Typedef: case Node::Function: @@ -4401,6 +4052,7 @@ bool twoColumn = false; if (section.members.first()->type() == Node::QmlProperty) { twoColumn = (count >= 5); + twoColumn = false; } if (twoColumn) out() << "\n"; @@ -4440,6 +4092,7 @@ #ifdef GENERATE_MAC_REFS generateMacRef(node, marker); #endif + generateExtractionMark(node, MemberMark); out() << "
    "; if (node->subType() == Node::QmlPropertyGroup) { const QmlPropGroupNode* qpgn = static_cast(node); @@ -4450,17 +4103,18 @@ while (p != qpgn->childNodes().end()) { if ((*p)->type() == Node::QmlProperty) { qpn = static_cast(*p); - - if (++numTableRows % 2 == 1) - out() << "
    "; - else - out() << ""; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; - out() << "

    "; - //out() << "

    "; // old + out() << "

    "; + out() << ""; - if (!qpn->isWritable()) + + if (!qpn->isWritable(myTree)) { out() << "read-only"; + } if (qpgn->isDefault()) out() << "default"; generateQmlItem(qpn, relative, marker, false); @@ -4476,11 +4130,11 @@ out() << "

    "; out() << ""; //out() << ""; - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - out() << ""; + else + out() << ""; + out() << ""; else out() << ""; - out() << ""; @@ -4512,6 +4166,7 @@ generateAlsoList(node, marker); out() << ""; out() << ""; + generateExtractionMark(node, EndMark); } /*! @@ -4529,16 +4184,14 @@ const Node* n = myTree->findNode(strList,Node::Fake); if (n && n->subType() == Node::QmlClass) { const QmlClassNode* qcn = static_cast(n); - out() << "

    "; Text text; - text << "[Inherits "; + text << Atom::ParaLeft << "Inherits "; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); text << Atom(Atom::String, linkPair.second); text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); - text << "]"; + text << Atom::ParaRight; generateText(text, cn, marker); - out() << "

    "; } } } @@ -4576,21 +4229,22 @@ { const ClassNode* cn = qcn->classNode(); if (cn && (cn->status() != Node::Internal)) { - out() << "

    "; Text text; - text << "["; + text << Atom::ParaLeft; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); - text << Atom(Atom::String, qcn->name()); + QString name = qcn->name(); + if (name.startsWith(QLatin1String("QML:"))) + name = name.mid(4); // remove the "QML:" prefix + text << Atom(Atom::String, name); text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); text << " instantiates the C++ class "; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn)); text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); text << Atom(Atom::String, cn->name()); text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); - text << "]"; + text << Atom::ParaRight; generateText(text, qcn, marker); - out() << "

    "; } } @@ -4607,9 +4261,8 @@ if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) { const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake); if (n && n->subType() == Node::QmlClass) { - out() << "

    "; Text text; - text << "["; + text << Atom::ParaLeft; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn)); text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); text << Atom(Atom::String, cn->name()); @@ -4619,9 +4272,8 @@ text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); text << Atom(Atom::String, n->name()); text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); - text << "]"; + text << Atom::ParaRight; generateText(text, cn, marker); - out() << "

    "; } } } @@ -4750,140 +4402,44 @@ file.close(); } -#endif - -#if 0 // fossil removed for new doc format MWS 19/04/2010 - out() << "\n"; - out() << QString("\n").arg(naturalLanguage); - - QString shortVersion; - if ((project != "Qtopia") && (project != "Qt Extended")) { - shortVersion = project + " " + shortVersion + ": "; - if (node && !node->doc().location().isEmpty()) - out() << "\n"; - - shortVersion = myTree->version(); - if (shortVersion.count(QChar('.')) == 2) - shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); - if (!shortVersion.isEmpty()) { - if (project == "QSA") - shortVersion = "QSA " + shortVersion + ": "; - else - shortVersion = "Qt " + shortVersion + ": "; - } - } - - out() << "\n" - " " << shortVersion << protectEnc(title) << "\n"; - out() << QString("").arg(outputEncoding); - - if (!style.isEmpty()) - out() << " \n"; - - const QMap &metaMap = node->doc().metaTagMap(); - if (!metaMap.isEmpty()) { - QMapIterator i(metaMap); - while (i.hasNext()) { - i.next(); - out() << " \n"; - } - } - - navigationLinks.clear(); - - if (node && !node->links().empty()) { - QPair linkPair; - QPair anchorPair; - const Node *linkNode; - - if (node->links().contains(Node::PreviousLink)) { - linkPair = node->links()[Node::PreviousLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " \n"; - - navigationLinks += "[Previous: "; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "]\n"; +void HtmlGenerator::generateExtractionMark(const Node *node, ExtractionMarkType markType) +{ + if (markType != EndMark) { + out() << "\n"; + } else { + out() << "\n"; } - - foreach (const QString &stylesheet, stylesheets) { - out() << " \n"; - } - - foreach (const QString &customHeadElement, customHeadElements) { - out() << " " << customHeadElement << "\n"; - } - - out() << "\n" - #endif +} + +#endif QT_END_NAMESPACE

    "; + if (++numTableRows % 2 == 1) + out() << "

    "; out() << ""; generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false); //generateQmlItem(qsn,relative,marker,false); @@ -4497,7 +4151,7 @@ out() << "

    "; + out() << "

    "; out() << ""; generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); out() << "