summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-23 21:21:51 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-23 21:21:51 (GMT)
commitb0e73713e0142ac1045b4c91c7fe55e8e965b7c2 (patch)
tree36e2d759460559e030b0dec09de7f9465f609260 /tools
parent0727c544915427372951b1c30715a09e473ec494 (diff)
parent22c482836b57540df89df261cdd5f9c4dadf0daa (diff)
downloadQt-b0e73713e0142ac1045b4c91c7fe55e8e965b7c2.zip
Qt-b0e73713e0142ac1045b4c91c7fe55e8e965b7c2.tar.gz
Qt-b0e73713e0142ac1045b4c91c7fe55e8e965b7c2.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: qdoc: Cleaned up the TOC for QML element pages. qdoc: Cleaned up the Inherits and Inherited by lines for QML elements. doc: Added missing \since 4.7 to effect propertyu.
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp52
1 files changed, 25 insertions, 27 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 1b62dc4..416d44a 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1256,20 +1256,18 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
generateHeader(title, inner, marker);
sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
generateTableOfContents(inner,marker,&sections);
- 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);
@@ -1476,7 +1474,13 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
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<const QmlClassNode*>(fake);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
+ generateTableOfContents(fake,marker,&sections);
+ }
+ else if (fake->name() != QString("index.html"))
generateTableOfContents(fake,marker,0);
generateTitle(fullTitle,
@@ -1550,16 +1554,15 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
}
#ifdef QDOC_QML
else if (fake->subType() == Node::QmlClass) {
- const QmlClassNode* qml_cn = static_cast<const QmlClassNode*>(fake);
const ClassNode* cn = qml_cn->classNode();
- generateQmlInherits(qml_cn, marker);
- generateQmlInstantiates(qml_cn, marker);
generateBrief(qml_cn, marker);
+ generateQmlInherits(qml_cn, marker);
generateQmlInheritedBy(qml_cn, marker);
- sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
+ generateQmlInstantiates(qml_cn, marker);
s = sections.begin();
while (s != sections.end()) {
- out() << "<a name=\"" << registerRef((*s).name) << "\"></a>" << divNavTop << "\n";
+ out() << "<a name=\"" << registerRef((*s).name.toLower())
+ << "\"></a>" << divNavTop << "\n";
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
generateQmlSummary(*s,fake,marker);
++s;
@@ -2063,7 +2066,8 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
}
}
else if (sections && ((node->type() == Node::Class) ||
- (node->type() == Node::Namespace))) {
+ (node->type() == Node::Namespace) ||
+ (node->subType() == Node::QmlClass))) {
QList<Section>::ConstIterator s = sections->begin();
while (s != sections->end()) {
if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) {
@@ -4180,16 +4184,14 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
const Node* n = myTree->findNode(strList,Node::Fake);
if (n && n->subType() == Node::QmlClass) {
const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
- out() << "<p class=\"centerAlign\">";
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() << "</p>";
}
}
}
@@ -4227,9 +4229,8 @@ void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
{
const ClassNode* cn = qcn->classNode();
if (cn && (cn->status() != Node::Internal)) {
- out() << "<p class=\"centerAlign\">";
Text text;
- text << "[";
+ text << Atom::ParaLeft;
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn));
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
QString name = qcn->name();
@@ -4242,9 +4243,8 @@ void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
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() << "</p>";
}
}
@@ -4261,9 +4261,8 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn,
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() << "<p class=\"centerAlign\">";
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());
@@ -4273,9 +4272,8 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn,
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() << "</p>";
}
}
}