diff options
author | David Boddie <dboddie@trolltech.com> | 2010-07-16 13:18:04 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-07-16 13:18:04 (GMT) |
commit | 42f1e22bdfe2fe29f305dbf50e23933b8e1ef8d0 (patch) | |
tree | 1c5ae2797ac21da8214c7b8cdaeebe49926585d0 /tools/qdoc3 | |
parent | e2fb9c4df301678719cb0cff78838b35435c3b38 (diff) | |
parent | ad4aff6e2d188d88a2c6b4b692932adb08491d22 (diff) | |
download | Qt-42f1e22bdfe2fe29f305dbf50e23933b8e1ef8d0.zip Qt-42f1e22bdfe2fe29f305dbf50e23933b8e1ef8d0.tar.gz Qt-42f1e22bdfe2fe29f305dbf50e23933b8e1ef8d0.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'tools/qdoc3')
-rw-r--r-- | tools/qdoc3/codemarker.cpp | 8 | ||||
-rw-r--r-- | tools/qdoc3/codemarker.h | 9 | ||||
-rw-r--r-- | tools/qdoc3/config.h | 1 | ||||
-rw-r--r-- | tools/qdoc3/cppcodemarker.cpp | 15 | ||||
-rw-r--r-- | tools/qdoc3/cppcodemarker.h | 7 | ||||
-rw-r--r-- | tools/qdoc3/cppcodeparser.cpp | 15 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 427 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.h | 22 | ||||
-rw-r--r-- | tools/qdoc3/javacodemarker.cpp | 6 | ||||
-rw-r--r-- | tools/qdoc3/javacodemarker.h | 5 | ||||
-rw-r--r-- | tools/qdoc3/node.cpp | 20 | ||||
-rw-r--r-- | tools/qdoc3/node.h | 1 | ||||
-rw-r--r-- | tools/qdoc3/plaincodemarker.cpp | 7 | ||||
-rw-r--r-- | tools/qdoc3/plaincodemarker.h | 1 | ||||
-rw-r--r-- | tools/qdoc3/qscodemarker.cpp | 7 | ||||
-rw-r--r-- | tools/qdoc3/qscodemarker.h | 1 | ||||
-rw-r--r-- | tools/qdoc3/test/assistant.qdocconf | 24 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-build-docs.qdocconf | 12 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-cpp-ignore.qdocconf | 3 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-html-templates.qdocconf | 8 | ||||
-rw-r--r-- | tools/qdoc3/test/qt.qdocconf | 7 | ||||
-rw-r--r-- | tools/qdoc3/tree.cpp | 14 | ||||
-rw-r--r-- | tools/qdoc3/tree.h | 20 |
23 files changed, 251 insertions, 389 deletions
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp index 33ceaf5..7130d61 100644 --- a/tools/qdoc3/codemarker.cpp +++ b/tools/qdoc3/codemarker.cpp @@ -630,4 +630,12 @@ QList<Section> CodeMarker::qmlSections(const QmlClassNode* , SynopsisStyle ) } #endif +const Node* CodeMarker::resolveTarget(const QString& , + const Tree* , + const Node* , + const Node* ) +{ + return 0; +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h index aab8a9c..53ad4a8 100644 --- a/tools/qdoc3/codemarker.h +++ b/tools/qdoc3/codemarker.h @@ -155,10 +155,11 @@ class CodeMarker virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode, SynopsisStyle style); #endif - virtual const Node *resolveTarget(const QString& target, - const Tree *tree, - const Node *relative) = 0; - virtual QStringList macRefsForNode(const Node *node); + virtual const Node* resolveTarget(const QString& target, + const Tree* tree, + const Node* relative, + const Node* self = 0); + virtual QStringList macRefsForNode(const Node* node); static void initialize(const Config& config); static void terminate(); diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index c29becc..af58a3f 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -143,6 +143,7 @@ class Config #define CONFIG_NATURALLANGUAGE "naturallanguage" #define CONFIG_OBSOLETELINKS "obsoletelinks" #define CONFIG_ONLINE "online" +#define CONFIG_CREATOR "creator" #define CONFIG_OUTPUTDIR "outputdir" #define CONFIG_OUTPUTENCODING "outputencoding" #define CONFIG_OUTPUTLANGUAGE "outputlanguage" diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index c4ee054..562e92b 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -825,9 +825,10 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, return sections; } -const Node *CppCodeMarker::resolveTarget(const QString &target, - const Tree *tree, - const Node *relative) +const Node *CppCodeMarker::resolveTarget(const QString& target, + const Tree* tree, + const Node* relative, + const Node* self) { if (target.endsWith("()")) { const FunctionNode *func; @@ -869,11 +870,13 @@ const Node *CppCodeMarker::resolveTarget(const QString &target, else { QStringList path = target.split("::"); const Node *node; + int flags = Tree::SearchBaseClasses | + Tree::SearchEnumValues | + Tree::NonFunction; if ((node = tree->findNode(path, relative, - Tree::SearchBaseClasses | - Tree::SearchEnumValues | - Tree::NonFunction))) + flags, + self))) return node; } return 0; diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h index 2dcf400..eca3936 100644 --- a/tools/qdoc3/cppcodemarker.h +++ b/tools/qdoc3/cppcodemarker.h @@ -81,9 +81,10 @@ class CppCodeMarker : public CodeMarker Status status); QList<Section> qmlSections(const QmlClassNode* qmlClassNode, SynopsisStyle style); - const Node *resolveTarget(const QString& target, - const Tree *tree, - const Node *relative); + const Node* resolveTarget(const QString& target, + const Tree* tree, + const Node* relative, + const Node* self = 0); private: QString addMarkUp(const QString& protectedCode, diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index e4870e3..d5108fd 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -728,23 +728,12 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, if (n) classNode = static_cast<const ClassNode*>(n); } - if (names[0].startsWith("Q")) + if (names[0].startsWith("Qt")) return new QmlClassNode(tre->root(), QLatin1String("QML:")+names[0], classNode); else return new QmlClassNode(tre->root(), names[0], classNode); } else if (command == COMMAND_QMLBASICTYPE) { -#if 0 - QStringList parts = arg.split(" "); - qDebug() << command << parts; - if (parts.size() > 1) { - FakeNode* pageNode = static_cast<FakeNode*>(tre->root()->findNode(parts[1], Node::Fake)); - if (pageNode) { - qDebug() << "FOUND"; - return new QmlBasicTypeNode(pageNode, parts[0]); - } - } -#endif return new QmlBasicTypeNode(tre->root(), arg); } else if ((command == COMMAND_QMLSIGNAL) || @@ -755,7 +744,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, QString type; QmlClassNode* qmlClass = 0; if (splitQmlMethodArg(doc,arg,type,element)) { - if (element.startsWith(QLatin1String("Q"))) + if (element.startsWith(QLatin1String("Qt"))) element = QLatin1String("QML:") + element; Node* n = tre->findNode(QStringList(element),Node::Fake); if (n && n->subType() == Node::QmlClass) { diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 89b1e98..9977df0 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -63,6 +63,12 @@ QT_BEGIN_NAMESPACE int HtmlGenerator::id = 0; bool HtmlGenerator::debugging_on = false; +#if 0 +QString HtmlGenerator::divNavTop = "<div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>"; +#endif + +QString HtmlGenerator::divNavTop = ""; + QString HtmlGenerator::sinceTitles[] = { " New Namespaces", @@ -214,6 +220,7 @@ HtmlGenerator::HtmlGenerator() numTableRows(0), threeColumnEnumValueTable(true), offlineDocs(true), + creatorDocs(true), funcLeftParen("\\S(\\()"), myTree(0), slow(false), @@ -276,6 +283,7 @@ void HtmlGenerator::initializeGenerator(const Config &config) 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"; @@ -346,17 +354,6 @@ QString HtmlGenerator::format() */ 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(); @@ -371,9 +368,6 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) findAllFunctions(tree->root()); findAllLegaleseTexts(tree->root()); findAllNamespaces(tree->root()); -#ifdef ZZZ_QDOC_QML - findAllQmlClasses(tree->root()); -#endif findAllSince(tree->root()); PageGenerator::generateTree(tree, marker); @@ -923,13 +917,13 @@ int HtmlGenerator::generateAtom(const Atom *atom, else out() << "<tr class=\"even\">"; - out() << "<tr><th>Constant</th>" - << "<th>Value</th>" - << "<th>Description</th></tr>\n"; + out() << "<tr><th class=\"tblConst\">Constant</th>" + << "<th class=\"tblval\">Value</th>" + << "<th class=\"tbldscr\">Description</th></tr>\n"; } else { out() << "<table class=\"valuelist\">" - << "<tr><th>Constant</th><th>Value</th></tr>\n"; + << "<tr><th class=\"tblConst\">Constant</th><th class=\"tblVal\">Value</th></tr>\n"; } } else { @@ -1067,11 +1061,11 @@ int HtmlGenerator::generateAtom(const Atom *atom, } sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); } - out() << "<a name=\"sec-" << sectionNumber.join("-") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"sec-" << sectionNumber.join("-") << "\"></a>" << divNavTop << "\n"; } #else out() << "<a name=\"" << Doc::canonicalTitle(Text::sectionHeading(atom).toString()) - << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + << "\"></a>" << divNavTop << "\n"; #endif break; case Atom::SectionRight: @@ -1143,9 +1137,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, case Atom::TableItemLeft: { if (inTableHeader) - out() << "<th"; + out() << "<th "; else - out() << "<td"; + out() << "<td "; QStringList spans = atom->string().split(","); if (spans.size() == 2) { @@ -1259,30 +1253,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, 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<QString, QString> publicGroups = myTree->publicGroups(); - QList<QString> groupNames = publicGroups.values(inner->name()); - if (!groupNames.isEmpty()) { - qSort(groupNames.begin(), groupNames.end()); - subtitleText << "["; - for (int j=0; j<groupNames.count(); j++) { - subtitleText << Atom(Atom::AutoLink, groupNames[j]); - if (j<groupNames.count()-1) - subtitleText <<", "; - } - subtitleText << "]"; - } - } -#endif - generateHeader(title, inner, marker); sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); generateTableOfContents(inner,marker,§ions); @@ -1343,7 +1313,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, // out() << "<hr />\n"; out() << "<a name=\"" << registerRef((*s).name.toLower()) - << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << protectEnc((*s).name) << "</h2>\n"; generateSection(s->members, inner, marker, CodeMarker::Summary); } @@ -1352,7 +1322,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, // out() << "<hr />\n"; out() << "<a name=\"" << registerRef(name.toLower()) - << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << protectEnc(name) << "</h2>\n"; generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); } @@ -1379,15 +1349,17 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, out() << "</ul>\n"; } - out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n"; if (!inner->doc().isEmpty()) { + generateExtractionMark(inner, DetailedDescriptionMark); //out() << "<hr />\n" - out() << "<div class=\"descr\"/>\n" // QTBUG-9504 + out() << "<div class=\"descr\">\n" // QTBUG-9504 << "<h2>" << "Detailed Description" << "</h2>\n"; generateBody(inner, marker); out() << "</div>\n"; // QTBUG-9504 generateAlsoList(inner, marker); + generateExtractionMark(inner, EndMark); } sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); @@ -1395,7 +1367,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, while (s != sections.end()) { //out() << "<hr />\n"; if (!(*s).divClass.isEmpty()) - out() << "<div class=\"" << (*s).divClass << "\"/>\n"; // QTBUG-9504 + out() << "<div class=\"" << (*s).divClass << "\">\n"; // QTBUG-9504 out() << "<h2>" << protectEnc((*s).name) << "</h2>\n"; NodeList::ConstIterator m = (*s).members.begin(); @@ -1519,12 +1491,12 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) generateStatus(fake, marker); if (moduleNamespaceMap.contains(fake->name())) { - out() << "<a name=\"" << registerRef("namespaces") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef("namespaces") << "\"></a>" << divNavTop << "\n"; out() << "<h2>Namespaces</h2>\n"; generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]); } if (moduleClassMap.contains(fake->name())) { - out() << "<a name=\"" << registerRef("classes") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef("classes") << "\"></a>" << divNavTop << "\n"; out() << "<h2>Classes</h2>\n"; generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]); } @@ -1587,18 +1559,20 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) sections = marker->qmlSections(qml_cn,CodeMarker::Summary); s = sections.begin(); while (s != sections.end()) { - out() << "<a name=\"" << registerRef((*s).name) << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef((*s).name) << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << protectEnc((*s).name) << "</h2>\n"; generateQmlSummary(*s,fake,marker); ++s; } - out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + generateExtractionMark(fake, DetailedDescriptionMark); + out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << "Detailed Description" << "</h2>\n"; generateBody(fake, marker); if (cn) generateQmlText(cn->doc().body(), cn, marker, fake->name()); generateAlsoList(fake, marker); + generateExtractionMark(fake, EndMark); //out() << "<hr />\n"; sections = marker->qmlSections(qml_cn,CodeMarker::Detailed); @@ -1623,7 +1597,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { - out() << "<a name=\"" << registerRef((*s).name) << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef((*s).name) << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << protectEnc((*s).name) << "</h2>\n"; generateSectionList(*s, fake, marker, CodeMarker::Summary); ++s; @@ -1631,16 +1605,20 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) Text brief = fake->doc().briefText(); if (fake->subType() == Node::Module && !brief.isEmpty()) { - out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; - out() << "<div class=\"descr\"/>\n"; // QTBUG-9504 + generateExtractionMark(fake, DetailedDescriptionMark); + out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n"; + out() << "<div class=\"descr\">\n"; // QTBUG-9504 out() << "<h2>" << "Detailed Description" << "</h2>\n"; } - else - out() << "<div class=\"descr\"/>\n"; // QTBUG-9504 + else { + generateExtractionMark(fake, DetailedDescriptionMark); + out() << "<div class=\"descr\">\n"; // QTBUG-9504 + } generateBody(fake, marker); out() << "</div>\n"; // QTBUG-9504 generateAlsoList(fake, marker); + generateExtractionMark(fake, EndMark); if (!fake->groupMembers().isEmpty()) { NodeMap groupMembersMap; @@ -1738,8 +1716,9 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title, } } else if (node->subType() == Node::Page) { - if (fn->name() == QString("examples.html")) { - out() << " <li>Examples</li>"; + if (fn->name() == QString("qdeclarativeexamples.html")) { + out() << " <li><a href=\"all-examples.html\">Examples</a></li>"; + out() << " <li>QML Examples & Demos</li>"; } else if (fn->name().startsWith("examples-")) { out() << " <li><a href=\"all-examples.html\">Examples</a></li>"; @@ -1759,10 +1738,14 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title, else if (node->subType() == Node::Example) { out() << " <li><a href=\"all-examples.html\">Examples</a></li>"; QStringList sl = fn->name().split('/'); - QString name = "examples-" + sl.at(0) + ".html"; - QString t = CodeParser::titleFromName(name); - out() << " <li><a href=\"" << name << "\">" - << t << "</a></li>"; + if (sl.contains("declarative")) + out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples & Demos</a></li>"; + else { + QString name = "examples-" + sl.at(0) + ".html"; + QString t = CodeParser::titleFromName(name); + out() << " <li><a href=\"" << name << "\">" + << t << "</a></li>"; + } out() << " <li>" << title << "</li>"; } } @@ -1795,21 +1778,38 @@ void HtmlGenerator::generateHeader(const QString& title, else shortVersion = "Qt " + shortVersion + ": "; } - + // Generating page title out() << " <title>" << shortVersion << protectEnc(title) << "</title>\n"; - - //out() << " <title>Qt Reference Documentation</title>"; - + // Adding style sheet + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"; + // Adding jquery and functions - providing online tools and search features + out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n"; + out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; + // 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\" />"; + + // Adding syntax highlighter // future release + + // Setting assistant configuration if (offlineDocs) { - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"; + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"; // Only for Qt Creator out() << "</head>\n"; - out() << "<body class=\"offline narrow\" >\n"; // narrow mainly for Creator - out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; + out() << "<body class=\"offline \">\n"; // offline for Assistant } + if (creatorDocs) + { + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"; // Only for Qt Creator + out() << "</head>\n"; + out() << "<body class=\"offline narrow creator\">\n"; // offline for Creator + } + // Setting online doc configuration else { - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\"\n />"; + // Browser spec styles out() << " <!--[if IE]>\n"; out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n"; out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n"; @@ -1823,25 +1823,9 @@ void HtmlGenerator::generateHeader(const QString& title, out() << "<!--[if IE 8]>\n"; out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n"; out() << "<![endif]-->\n"; - // jquery functions - out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n"; - out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; - // menus and small docs js and css - out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n"; - out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />"; - - // syntax highlighter js and css - // out() << " <link type=\"text/css\" rel=\"stylesheet\" href=\"style/shCore.css\"/>\n"; - // out() << " <link type=\"text/css\" rel=\"stylesheet\" href=\"style/shThemeDefault.css\"/>\n"; - // out() << " <script type=\"text/javascript\" src=\"scripts/shCore.js\"></script>\n"; - // out() << " <script type=\"text/javascript\" src=\"scripts/shBrushCpp.js\"></script>\n"; - // out() << " <script type=\"text/javascript\">\n"; - // out() << " SyntaxHighlighter.all();\n"; - // out() << " </script>\n"; out() << "</head>\n"; + // CheckEmptyAndLoadList activating search out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n"; } @@ -1853,7 +1837,7 @@ void HtmlGenerator::generateHeader(const QString& title, 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() << "<p>\n" << navigationLinks << "</p>\n"; #endif @@ -1890,6 +1874,10 @@ void HtmlGenerator::generateFooter(const Node *node) { out() << "</body>\n"; } + if (creatorDocs) + { + out() << "</body>\n"; + } else { out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; @@ -1913,6 +1901,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, { Text brief = node->doc().briefText(); if (!brief.isEmpty()) { + generateExtractionMark(node, BriefMark); out() << "<p>"; generateText(brief, node, marker); if (!relative || node == relative) @@ -1920,6 +1909,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, else out() << " <a href=\"" << linkForNode(node, relative) << "#"; out() << registerRef("details") << "\">More...</a></p>\n"; + generateExtractionMark(node, EndMark); } } @@ -2072,7 +2062,8 @@ void HtmlGenerator::generateTableOfContents(const Node *node, } } } - else if (sections && (node->type() == Node::Class)) { + else if (sections && ((node->type() == Node::Class) || + (node->type() == Node::Namespace))) { QList<Section>::ConstIterator s = sections->begin(); while (s != sections->end()) { if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) { @@ -2333,20 +2324,20 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative, out() << "<tr class=\"odd topAlign\">"; else out() << "<tr class=\"even topAlign\">"; - out() << "<td><p>"; + out() << "<td class=\"tblName\"><p>"; generateFullName(node, relative, marker); out() << "</p></td>"; if (!(node->type() == Node::Fake)) { Text brief = node->doc().trimmedBriefText(name); if (!brief.isEmpty()) { - out() << "<td><p>"; + out() << "<td class=\"tblDescr\"><p>"; generateText(brief, node, marker); out() << "</p></td>"; } } else { - out() << "<td><p>"; + out() << "<td class=\"tblDescr\"><p>"; out() << protectEnc(node->doc().briefText().toString()); out() << "</p></td>"; } @@ -2665,19 +2656,7 @@ void HtmlGenerator::generateQmlItem(const Node *node, marked.replace("<@type>", ""); marked.replace("</@type>", ""); } - if (node->type() == Node::QmlProperty) { - const QmlPropertyNode* qpn = static_cast<const QmlPropertyNode*>(node); - if (!summary && qpn->name() == "color" && qpn->dataType() == "color") { - if (relative && relative->name() == "GradientStop") { - qDebug() << "color : color"; - debugging_on = true; - qDebug() << " " << relative->name() << relative->type() << relative->subType(); - qDebug() << marked; - } - } - } - out() << highlightedCode(marked, marker, relative); - debugging_on = false; + out() << highlightedCode(marked, marker, relative, false, node); } #endif @@ -2988,7 +2967,8 @@ void HtmlGenerator::generateSynopsis(const Node *node, QString HtmlGenerator::highlightedCode(const QString& markedCode, CodeMarker* marker, const Node* relative, - bool alignNames) + bool alignNames, + const Node* self) { QString src = markedCode; QString html; @@ -3002,7 +2982,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, static const QString headerTag("headerfile"); static const QString funcTag("func"); static const QString linkTag("link"); - + // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)" bool done = false; for (int i = 0, srcSize = src.size(); i < srcSize;) { @@ -3067,13 +3047,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, bool handled = false; if (parseArg(src, typeTag, &i, srcSize, &arg, &par1)) { par1 = QStringRef(); - const Node* n = marker->resolveTarget(arg.toString(), myTree, relative); - if (HtmlGenerator::debugging_on) { - if (n) { - qDebug() << " " << n->name() << n->type() << n->subType(); - qDebug() << " " << relative->name() << relative->type() << relative->subType(); - } - } + const Node* n = marker->resolveTarget(arg.toString(), myTree, relative, self); addLink(linkForNode(n,relative), arg, &html); handled = true; } @@ -3504,6 +3478,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node, #ifdef GENERATE_MAC_REFS generateMacRef(node, marker); #endif + generateExtractionMark(node, MemberMark); if (node->type() == Node::Enum && (enume = static_cast<const EnumNode *>(node))->flagsType()) { #ifdef GENERATE_MAC_REFS @@ -3523,7 +3498,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node, out() << "<h3 class=\"fn\">"; out() << "<a name=\"" + refForNode(node) + "\"></a>"; generateSynopsis(node, relative, marker, CodeMarker::Detailed); - out() << "</h3><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "</h3>" << divNavTop << "\n"; } generateStatus(node, marker); @@ -3566,6 +3541,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node, } } generateAlsoList(node, marker); + generateExtractionMark(node, EndMark); } void HtmlGenerator::findAllClasses(const InnerNode *node) @@ -3679,13 +3655,6 @@ void HtmlGenerator::findAllSince(const InnerNode *node) } } -#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(); @@ -3749,29 +3718,6 @@ void HtmlGenerator::findAllNamespaces(const InnerNode *node) } } -#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<const FakeNode *>(*c); - if (fakeNode->subType() == Node::QmlClass) { - const QmlClassNode* qmlNode = - static_cast<const QmlClassNode*>(fakeNode); - const Node* n = qmlNode->classNode(); - } - qmlClasses.insert(fakeNode->name(),*c); - } - ++c; - } -} -#endif - int HtmlGenerator::hOffset(const Node *node) { switch (node->type()) { @@ -3780,12 +3726,6 @@ int HtmlGenerator::hOffset(const Node *node) return 2; case Node::Fake: return 1; -#if 0 - if (node->doc().briefText().isEmpty()) - return 1; - else - return 2; -#endif case Node::Enum: case Node::Typedef: case Node::Function: @@ -4148,6 +4088,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, #ifdef GENERATE_MAC_REFS generateMacRef(node, marker); #endif + generateExtractionMark(node, MemberMark); out() << "<div class=\"qmlitem\">"; if (node->subType() == Node::QmlPropertyGroup) { const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node); @@ -4163,7 +4104,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, else out() << "<tr class=\"even\">"; - out() << "<td><p>"; + out() << "<td class=\"tblQmlPropNode\"><p>"; out() << "<a name=\"" + refForNode(qpn) + "\"></a>"; if (!qpn->isWritable()) @@ -4187,7 +4128,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, out() << "<tr class=\"odd\">"; else out() << "<tr class=\"even\">"; - out() << "<td><p>"; + out() << "<td class=\"tblQmlFuncNode\"><p>"; out() << "<a name=\"" + refForNode(qsn) + "\"></a>"; generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false); //generateQmlItem(qsn,relative,marker,false); @@ -4204,7 +4145,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, out() << "<tr class=\"odd\">"; else out() << "<tr class=\"even\">"; - out() << "<td><p>"; + out() << "<td class=\"tblQmlFuncNode\"><p>"; out() << "<a name=\"" + refForNode(qmn) + "\"></a>"; generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); out() << "</p></td></tr>"; @@ -4219,6 +4160,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, generateAlsoList(node, marker); out() << "</div>"; out() << "</div>"; + generateExtractionMark(node, EndMark); } /*! @@ -4288,7 +4230,10 @@ void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, text << "["; 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)); @@ -4457,140 +4402,40 @@ void HtmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* marke file.close(); } -#endif - -#if 0 // fossil removed for new doc format MWS 19/04/2010 - out() << "<!DOCTYPE html\n" - " PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">\n"; - out() << QString("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"%1\" lang=\"%1\">\n").arg(naturalLanguage); - - QString shortVersion; - if ((project != "Qtopia") && (project != "Qt Extended")) { - shortVersion = project + " " + shortVersion + ": "; - if (node && !node->doc().location().isEmpty()) - out() << "<!-- " << node->doc().location().fileName() << " -->\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() << "<head>\n" - " <title>" << shortVersion << protectEnc(title) << "</title>\n"; - out() << QString("<meta http-equiv=\"Content-type\" content=\"text/html; charset=%1\" />").arg(outputEncoding); - - if (!style.isEmpty()) - out() << " <style type=\"text/css\">" << style << "</style>\n"; - - const QMap<QString, QString> &metaMap = node->doc().metaTagMap(); - if (!metaMap.isEmpty()) { - QMapIterator<QString, QString> i(metaMap); - while (i.hasNext()) { - i.next(); - out() << " <meta name=\"" << protectEnc(i.key()) << "\" contents=\"" - << protectEnc(i.value()) << "\" />\n"; - } - } - - navigationLinks.clear(); - - if (node && !node->links().empty()) { - QPair<QString,QString> linkPair; - QPair<QString,QString> 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() << " <link rel=\"prev\" href=\"" - << anchorPair.first << "\" />\n"; - - navigationLinks += "[Previous: <a href=\"" + anchorPair.first + "\">"; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "</a>]\n"; - } - if (node->links().contains(Node::ContentsLink)) { - linkPair = node->links()[Node::ContentsLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " <link rel=\"contents\" href=\"" - << anchorPair.first << "\" />\n"; - - navigationLinks += "[<a href=\"" + anchorPair.first + "\">"; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "</a>]\n"; - } - if (node->links().contains(Node::NextLink)) { - linkPair = node->links()[Node::NextLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " <link rel=\"next\" href=\"" - << anchorPair.first << "\" />\n"; - - navigationLinks += "[Next: <a href=\"" + anchorPair.first + "\">"; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "</a>]\n"; - } - if (node->links().contains(Node::IndexLink)) { - linkPair = node->links()[Node::IndexLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - out() << " <link rel=\"index\" href=\"" - << anchorPair.first << "\" />\n"; - } - if (node->links().contains(Node::StartLink)) { - linkPair = node->links()[Node::StartLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - out() << " <link rel=\"start\" href=\"" - << anchorPair.first << "\" />\n"; +void HtmlGenerator::generateExtractionMark(const Node *node, ExtractionMarkType markType) +{ + if (markType != EndMark) { + out() << "<!-- $$$" + node->name(); + if (markType == MemberMark) { + if (node->type() == Node::Function) { + const FunctionNode *func = static_cast<const FunctionNode *>(node); + if (!func->associatedProperty()) { + if (func->overloadNumber() == 1) + out() << "[overload1]"; + out() << "$$$" + func->name() + func->rawParameters().remove(' '); + } + } else if (node->type() == Node::Property) { + const PropertyNode *prop = static_cast<const PropertyNode *>(node); + out() << "-prop"; + const NodeList &list = prop->functions(); + foreach (const Node *propFuncNode, list) { + if (propFuncNode->type() == Node::Function) { + const FunctionNode *func = static_cast<const FunctionNode *>(propFuncNode); + out() << "$$$" + func->name() + func->rawParameters().remove(' '); + } + } + } + } else if (markType == BriefMark) { + out() << "-brief"; + } else if (markType == DetailedDescriptionMark) { + out() << "-description"; } + out() << " -->\n"; + } else { + out() << "<!-- @@@" + node->name() + " -->\n"; } +} - foreach (const QString &stylesheet, stylesheets) { - out() << " <link href=\"" << stylesheet << "\" rel=\"stylesheet\" " - << "type=\"text/css\" />\n"; - } - - foreach (const QString &customHeadElement, customHeadElements) { - out() << " " << customHeadElement << "\n"; - } - - out() << "</head>\n" - #endif +#endif QT_END_NAMESPACE diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 80341de..aaf2318 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -123,6 +123,12 @@ class HtmlGenerator : public PageGenerator private: enum SubTitleSize { SmallSubTitle, LargeSubTitle }; + enum ExtractionMarkType { + BriefMark, + DetailedDescriptionMark, + MemberMark, + EndMark + }; const QPair<QString,QString> anchorForNode(const Node *node); const Node *findNodeForTarget(const QString &target, @@ -210,9 +216,10 @@ class HtmlGenerator : public PageGenerator const Node *relative, CodeMarker *marker); QString highlightedCode(const QString& markedCode, - CodeMarker *marker, - const Node *relative, - bool alignNames = false); + CodeMarker* marker, + const Node* relative, + bool alignNames = false, + const Node* self = 0); void generateFullName(const Node *apparentNode, const Node *relative, @@ -236,9 +243,6 @@ class HtmlGenerator : public PageGenerator void findAllFunctions(const InnerNode *node); void findAllLegaleseTexts(const InnerNode *node); void findAllNamespaces(const InnerNode *node); -#ifdef ZZZ_QDOC_QML - void findAllQmlClasses(const InnerNode *node); -#endif void findAllSince(const InnerNode *node); static int hOffset(const Node *node); static bool isThreeColumnEnumValueTable(const Atom *atom); @@ -268,6 +272,7 @@ class HtmlGenerator : public PageGenerator CodeMarker* marker) const; void generatePageIndex(const QString& fileName, CodeMarker* marker) const; + void generateExtractionMark(const Node *node, ExtractionMarkType markType); #if 0 NavigationBar currentNavigationBar; @@ -290,6 +295,7 @@ class HtmlGenerator : public PageGenerator int numTableRows; bool threeColumnEnumValueTable; bool offlineDocs; + bool creatorDocs; QString link; QStringList sectionNumber; QRegExp funcLeftParen; @@ -316,9 +322,6 @@ class HtmlGenerator : public PageGenerator NodeMap obsoleteClasses; NodeMap namespaceIndex; NodeMap serviceClasses; -#ifdef QDOC_QML - NodeMap qmlClasses; -#endif QMap<QString, NodeMap > funcIndex; QMap<Text, const Node *> legaleseTexts; NewSinceMaps newSinceMaps; @@ -328,6 +331,7 @@ class HtmlGenerator : public PageGenerator static int id; public: static bool debugging_on; + static QString divNavTop; }; #define HTMLGENERATOR_ADDRESS "address" diff --git a/tools/qdoc3/javacodemarker.cpp b/tools/qdoc3/javacodemarker.cpp index 1918cd8..c9a8f60 100644 --- a/tools/qdoc3/javacodemarker.cpp +++ b/tools/qdoc3/javacodemarker.cpp @@ -155,8 +155,10 @@ QList<Section> JavaCodeMarker::sections(const InnerNode * /* inner */, SynopsisS return QList<Section>(); } -const Node *JavaCodeMarker::resolveTarget(const QString &target, const Tree *tree, - const Node *relative) +const Node *JavaCodeMarker::resolveTarget(const QString &target, + const Tree *tree, + const Node *relative, + const Node* /* self */) { if (target.endsWith("()")) { const FunctionNode *func; diff --git a/tools/qdoc3/javacodemarker.h b/tools/qdoc3/javacodemarker.h index a2d04dd..c2aabc0 100644 --- a/tools/qdoc3/javacodemarker.h +++ b/tools/qdoc3/javacodemarker.h @@ -72,7 +72,10 @@ public: QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status); QString functionBeginRegExp( const QString& funcName ); QString functionEndRegExp( const QString& funcName ); - const Node *resolveTarget( const QString& target, const Tree *tree, const Node *relative ); + const Node* resolveTarget( const QString& target, + const Tree* tree, + const Node* relative, + const Node* self = 0 ); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index b077074..0ca4870 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -299,7 +299,7 @@ InnerNode::~InnerNode() Node *InnerNode::findNode(const QString& name) { Node *node = childMap.value(name); - if (node) + if (node && node->subType() != QmlPropertyGroup) return node; if ((type() == Fake) && (subType() == QmlClass)) { for (int i=0; i<children.size(); ++i) { @@ -1246,6 +1246,24 @@ QStringList FunctionNode::parameterNames() const } /*! + Returns a raw list of parameters. If \a names is true, the + names are included. If \a values is true, the default values + are included, if any are present. + */ +QString FunctionNode::rawParameters(bool names, bool values) const +{ + QString raw; + foreach (const Parameter ¶meter, parameters()) { + raw += parameter.leftType() + parameter.rightType(); + if (names) + raw += parameter.name(); + if (values) + raw += parameter.defaultValue(); + } + return raw; +} + +/*! Returns the list of reconstructed parameters. If \a values is true, the default values are included, if any are present. */ diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index e9f2d74..121b818 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -616,6 +616,7 @@ class FunctionNode : public LeafNode int numOverloads() const; const QList<Parameter>& parameters() const { return params; } QStringList parameterNames() const; + QString rawParameters(bool names = false, bool values = false) const; const FunctionNode* reimplementedFrom() const { return rf; } const QList<FunctionNode*> &reimplementedBy() const { return rb; } const PropertyNode* associatedProperty() const { return ap; } diff --git a/tools/qdoc3/plaincodemarker.cpp b/tools/qdoc3/plaincodemarker.cpp index 4abfd2b..d825c13 100644 --- a/tools/qdoc3/plaincodemarker.cpp +++ b/tools/qdoc3/plaincodemarker.cpp @@ -129,11 +129,4 @@ QList<Section> PlainCodeMarker::sections(const InnerNode * /* innerNode */, return QList<Section>(); } -const Node *PlainCodeMarker::resolveTarget( const QString& /* target */, - const Tree * /* tree */, - const Node * /* relative */ ) -{ - return 0; -} - QT_END_NAMESPACE diff --git a/tools/qdoc3/plaincodemarker.h b/tools/qdoc3/plaincodemarker.h index e9cc40d..7afb88e 100644 --- a/tools/qdoc3/plaincodemarker.h +++ b/tools/qdoc3/plaincodemarker.h @@ -71,7 +71,6 @@ public: QString functionBeginRegExp( const QString& funcName ); QString functionEndRegExp( const QString& funcName ); QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status); - const Node *resolveTarget(const QString &target, const Tree *tree, const Node *relative); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/qscodemarker.cpp b/tools/qdoc3/qscodemarker.cpp index d4b8e80..2ee5d99 100644 --- a/tools/qdoc3/qscodemarker.cpp +++ b/tools/qdoc3/qscodemarker.cpp @@ -375,11 +375,4 @@ QList<Section> QsCodeMarker::sections( const InnerNode *inner, SynopsisStyle sty return sections; } -const Node *QsCodeMarker::resolveTarget( const QString& /* target */, - const Tree * /* tree */, - const Node * /* relative */ ) -{ - return 0; -} - QT_END_NAMESPACE diff --git a/tools/qdoc3/qscodemarker.h b/tools/qdoc3/qscodemarker.h index 1590009..c6a177f 100644 --- a/tools/qdoc3/qscodemarker.h +++ b/tools/qdoc3/qscodemarker.h @@ -72,7 +72,6 @@ public: QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status); QString functionBeginRegExp( const QString& funcName ); QString functionEndRegExp( const QString& funcName ); - const Node *resolveTarget( const QString& target, const Tree *tree, const Node *relative ); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 4b52992..8d5fa89 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -17,7 +17,10 @@ qhp.Assistant.namespace = com.trolltech.assistant.470 qhp.Assistant.virtualFolder = qdoc qhp.Assistant.indexTitle = Qt Assistant Manual qhp.Assistant.extraFiles = images/bg_l.png \ - images/bg_l_blank.png \ + images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -25,24 +28,27 @@ qhp.Assistant.extraFiles = images/bg_l.png \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/OfflineStyle.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css + scripts/functions.js \ + scripts/jquery.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css qhp.Assistant.filterAttributes = qt 4.7.0 tools assistant qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 140b81f..4ac4f47 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -24,6 +24,9 @@ qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.extraFiles = index.html \ images/bg_l.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -31,12 +34,12 @@ qhp.Qt.extraFiles = index.html \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -44,17 +47,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - scripts/shBrushCpp.js \ - scripts/shCore.js \ - scripts/shLegacy.js \ scripts/narrow.js \ scripts/superfish.js \ - style/shCore.css \ - style/shThemeDefault.css \ style/narrow.css \ style/superfish.css \ - style/superfish_skin.css \ - style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf index dcf33dc..8cc4fd9 100644 --- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf +++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf @@ -90,4 +90,5 @@ Cpp.ignoredirectives = Q_DECLARE_HANDLE \ __attribute__ \ K_DECLARE_PRIVATE \ PHONON_OBJECT \ - PHONON_HEIR + PHONON_HEIR \ + Q_PRIVATE_PROPERTY diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 31c9d5a..b428a90 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -17,12 +17,11 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " <div id=\"nav-topright\">\n" \ " <ul>\n" \ " <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \ - " <li class=\"nav-topright-dev\"><a href=\"http://qt.nokia.com/developer\">DEV</a></li>\n" \ + " <li class=\"nav-topright-dev\"><a href=\"http://developer.qt.nokia.com/\">DEV</a></li>\n" \ " <li class=\"nav-topright-labs\"><a href=\"http://labs.qt.nokia.com/blogs/\">LABS</a></li>\n" \ " <li class=\"nav-topright-doc nav-topright-doc-active\"><a href=\"http://doc.qt.nokia.com/\">\n" \ " DOC</a></li>\n" \ " <li class=\"nav-topright-blog\"><a href=\"http://blog.qt.nokia.com/\">BLOG</a></li>\n" \ - " <li class=\"nav-topright-shop\"><a title=\"SHOP\" href=\"http://shop.qt.nokia.com\">SHOP</a></li>\n" \ " </ul>\n" \ " </div>\n" \ " <div id=\"shortCut\">\n" \ @@ -113,7 +112,6 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \ " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \ - " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \ " </ul> \n" \ " </div>\n" \ " </div>\n" \ @@ -160,8 +158,8 @@ HTML.footer = " <!-- /div -->\n" \ " <div id=\"feedbackBox\">\n" \ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \ - " <p id=\"noteHead\">Thank you for giving your feedback. <div class=\"note\">Make sure it is related the page. For more general bugs and \n" \ - " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a></div></p>\n" \ + " <p id=\"noteHead\">Thank you for giving your feedback. <div class=\"note\">Make sure it is related to this specific page. For more general bugs and \n" \ + " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a>.</div></p>\n" \ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \ " </form>\n" \ diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index d132771..5575b7b 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -51,17 +51,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - scripts/shBrushCpp.js \ - scripts/shCore.js \ - scripts/shLegacy.js \ scripts/narrow.js \ scripts/superfish.js \ - style/shCore.css \ - style/shThemeDefault.css \ style/narrow.css \ style/superfish.css \ - style/superfish_skin.css \ - style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 70b998f..d22a09a 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -125,18 +125,20 @@ Tree::~Tree() /*! */ -Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags) +Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags, const Node* self) { return const_cast<Node*>(const_cast<const Tree*>(this)->findNode(path, relative, - findFlags)); + findFlags, + self)); } /*! */ const Node* Tree::findNode(const QStringList &path, const Node* start, - int findFlags) const + int findFlags, + const Node* self) const { const Node* current = start; if (!current) @@ -171,9 +173,11 @@ const Node* Tree::findNode(const QStringList &path, } if (node && i == path.size() && (!(findFlags & NonFunction) || node->type() != Node::Function - || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams)) - if ((node != start) && (node->subType() != Node::QmlPropertyGroup)) + || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams)) { + if ((node != self) && (node->subType() != Node::QmlPropertyGroup)) { return node; + } + } current = current->parent(); } while (current); diff --git a/tools/qdoc3/tree.h b/tools/qdoc3/tree.h index 0865847..b34c3a8 100644 --- a/tools/qdoc3/tree.h +++ b/tools/qdoc3/tree.h @@ -65,10 +65,13 @@ class Tree Tree(); ~Tree(); - Node *findNode(const QStringList &path, Node *relative=0, int findFlags=0); - Node *findNode(const QStringList &path, + Node* findNode(const QStringList &path, + Node* relative=0, + int findFlags=0, + const Node* self=0); + Node* findNode(const QStringList &path, Node::Type type, - Node *relative = 0, + Node* relative = 0, int findFlags = 0); FunctionNode *findFunctionNode(const QStringList &path, Node *relative = 0, @@ -98,12 +101,13 @@ class Tree NamespaceNode *root() { return &roo; } QString version() const { return vers; } - const Node *findNode(const QStringList &path, - const Node *relative = 0, - int findFlags = 0) const; - const Node *findNode(const QStringList &path, + const Node* findNode(const QStringList &path, + const Node* relative = 0, + int findFlags = 0, + const Node* self=0) const; + const Node* findNode(const QStringList &path, Node::Type type, const - Node *relative = 0, + Node* relative = 0, int findFlags = 0) const; const FunctionNode *findFunctionNode(const QStringList &path, const Node *relative = 0, |