Skip to content

Commit 6907f27

Browse files
committed
Incorrect link from summary links for classes
When running a link checker on the CGAL Classification or Point_set_processing_3 package we get the warning: ``` List of broken links and other issues: file:///.../doc_output/Classification/classCGAL_1_1Classification_1_1Point__set__feature__generator.html Code: 200 (no message) To do: Some of the links to this resource point to broken URI fragments (such as index.html#fragment). The following fragments need to be fixed: nested-classes ``` This is due to the fact that on the mentioned page no "section" classes is but in the summary links (top right) there is still "Classes".
1 parent 979ea24 commit 6907f27

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/classdef.cpp

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,7 @@ void ClassDefImpl::writeAuthorSection(OutputList &ol) const
21202120

21212121
void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
21222122
{
2123+
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
21232124
ol.pushGeneratorState();
21242125
ol.disableAllBut(OutputGenerator::Html);
21252126
QListIterator<LayoutDocEntry> eli(
@@ -2137,9 +2138,22 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
21372138
m_impl->innerClasses->declVisible()
21382139
)
21392140
{
2140-
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
2141-
ol.writeSummaryLink(0,"nested-classes",ls->title(lang),first);
2142-
first=FALSE;
2141+
ClassSDict::Iterator sdi(*(m_impl->innerClasses));
2142+
ClassDef *cd=0;
2143+
for (sdi.toFirst();(cd=sdi.current());++sdi)
2144+
{
2145+
if (!cd->isAnonymous() &&
2146+
!cd->isExtension() &&
2147+
(cd->protection()!=Private || extractPrivate) &&
2148+
cd->visibleInParentsDeclList()
2149+
)
2150+
{
2151+
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
2152+
ol.writeSummaryLink(0,"nested-classes",ls->title(lang),first);
2153+
first=FALSE;
2154+
break;
2155+
}
2156+
}
21432157
}
21442158
else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
21452159
!m_impl->allMemberNameInfoLinkedMap.empty() &&

0 commit comments

Comments
 (0)