@@ -367,58 +367,6 @@ bool DefinitionImpl::hasSections() const
367367 return FALSE ;
368368}
369369
370- void DefinitionImpl::addSectionsToIndex ()
371- {
372- if (m_impl->sectionRefs .empty ()) return ;
373- // printf("DefinitionImpl::addSectionsToIndex()\n");
374- int level=1 ;
375- for (auto it = m_impl->sectionRefs .begin (); it!=m_impl->sectionRefs .end (); ++it)
376- {
377- const SectionInfo *si = *it;
378- SectionType type = si->type ();
379- if (type.isSection ())
380- {
381- // printf(" level=%d title=%s\n",level,qPrint(si->title));
382- int nextLevel = type.level ();
383- if (nextLevel>level)
384- {
385- for (int i=level;i<nextLevel;i++)
386- {
387- Doxygen::indexList->incContentsDepth ();
388- }
389- }
390- else if (nextLevel<level)
391- {
392- for (int i=nextLevel;i<level;i++)
393- {
394- Doxygen::indexList->decContentsDepth ();
395- }
396- }
397- QCString title = si->title ();
398- if (title.isEmpty ()) title = si->label ();
399- const MemberDef *md = m_impl->def ->definitionType ()==Definition::TypeMember ? toMemberDef (m_impl->def ) : nullptr ;
400- const Definition *scope = m_impl->def ->definitionType ()==Definition::TypeMember ? m_impl->def ->getOuterScope () : m_impl->def ;
401- title = parseCommentAsText (scope,md,title,si->fileName (),si->lineNr ());
402- // determine if there is a next level inside this item, but be aware of the anchor and table section references.
403- auto it_next = std::next (it);
404- bool isDir = (it_next!=m_impl->sectionRefs .end ()) ?
405- ((*it_next)->type ().isSection () && (*it_next)->type ().level () > nextLevel) : false ;
406- Doxygen::indexList->addContentsItem (isDir,title,
407- getReference (),
408- m_impl->def ->getOutputFileBase (),
409- si->label (),
410- false ,
411- true );
412- level = nextLevel;
413- }
414- }
415- while (level>1 )
416- {
417- Doxygen::indexList->decContentsDepth ();
418- level--;
419- }
420- }
421-
422370void DefinitionImpl::writeDocAnchorsToTagFile (TextStream &tagFile) const
423371{
424372 if (!m_impl->sectionRefs .empty ())
0 commit comments