Skip to content

Commit

Permalink
issue #7248: Including external tag files with TOC produces a broken …
Browse files Browse the repository at this point in the history
…index.qhp

Ignore automatically generated anchor names when importing a tag file.
  • Loading branch information
albert-github committed Sep 9, 2019
1 parent 81da20f commit 4a72a9b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/tagreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,23 @@ class TagFileParser : public QXmlDefaultHandler

void endDocAnchor()
{
// Check whether or not the tag is automatically generate, in that case ignore the tag.
switch(m_state)
{
case InClass:
case InFile:
case InNamespace:
case InGroup:
case InPage:
case InMember:
case InPackage:
case InDir:
if (QString(m_curString).startsWith("autotoc_md")) return;
break;
default:
warn("Unexpected tag 'docanchor' found");
return;
}
switch(m_state)
{
case InClass: m_curClass->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
Expand All @@ -504,7 +521,7 @@ class TagFileParser : public QXmlDefaultHandler
case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
default: warn("Unexpected tag 'docanchor' found"); break;
default: warn("Unexpected tag 'docanchor' found"); break; // Not really necessary anymore
}
}

Expand Down

0 comments on commit 4a72a9b

Please sign in to comment.