qdoc: Fixed broken TOC links to Reimplemented sections

This update fixes some links in the table of contents on class
reference pages. Links to sections of reimplemented functions did not
work because the word 'reimplemented' was not included in the anchor.
This update fixes that bug.

Change-Id: Ifae972c45ebf6c81e865cfb36f645ea42d74cf55
Task-number: QTBUG-42237
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
Martin Smith 2014-12-10 15:08:20 +01:00
parent 2bd8443663
commit 7869ee5b9d

View File

@ -1226,11 +1226,10 @@ void HtmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker)
}
if (!s->reimpMembers.isEmpty()) {
QString name = QString("Reimplemented ") + (*s).name;
QString ref = registerRef(name.toLower());
// out() << "<hr />\n";
out() << "<a name=\""
<< registerRef(name.toLower())
<< "\"></a>" << divNavTop << "\n";
out() << "<h2>" << protectEnc(name) << "</h2>\n";
out() << "<a name=\"" << ref << "\"></a>" << divNavTop << "\n";
out() << "<h2 id=\"" << ref << "\">" << protectEnc(name) << "</h2>\n";
generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
}
@ -2221,7 +2220,7 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
else if (sections && (node->isClass() || node->isNamespace() || node->isQmlType())) {
QList<Section>::ConstIterator s = sections->constBegin();
while (s != sections->constEnd()) {
if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) {
if (!s->members.isEmpty()) {
out() << "<li class=\"level"
<< sectionNumber.size()
<< "\"><a href=\"#"
@ -2229,6 +2228,15 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
<< "\">" << (*s).name
<< "</a></li>\n";
}
if (!s->reimpMembers.isEmpty()) {
QString ref = QString("Reimplemented ") + (*s).pluralMember;
out() << "<li class=\"level"
<< sectionNumber.size()
<< "\"><a href=\"#"
<< registerRef(ref.toLower())
<< "\">" << QString("Reimplemented ") + (*s).name
<< "</a></li>\n";
}
++s;
}
out() << "<li class=\"level"