diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-03-15 15:54:38 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-03-15 15:54:38 (GMT) |
commit | 9ead1e6b562dc91ecd0ef9c55e76d803740ded9b (patch) | |
tree | 87089896547550ca1e8d9f5826e53319abb8cd9f /src/doxygen.cpp | |
parent | 941eea998d6b9608b8fc586069ef90e805d771f5 (diff) | |
parent | dacdb42c998ecb383c2c9dede7cdaece42b1165e (diff) | |
download | Doxygen-9ead1e6b562dc91ecd0ef9c55e76d803740ded9b.zip Doxygen-9ead1e6b562dc91ecd0ef9c55e76d803740ded9b.tar.gz Doxygen-9ead1e6b562dc91ecd0ef9c55e76d803740ded9b.tar.bz2 |
Merge branch 'master' of github.com:doxygen/doxygen
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index d6ae5ba..26eda84 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -8643,15 +8643,30 @@ static void findMainPage(EntryNav *rootNav) Doxygen::mainPage->setShowToc(root->stat); addPageToContext(Doxygen::mainPage,rootNav); - // a page name is a label as well! - SectionInfo *si=new SectionInfo( - indexName, + SectionInfo *si = Doxygen::sectionDict->find(Doxygen::mainPage->name()); + if (si) + { + if (si->lineNr != -1) + { + warn(root->fileName,root->startLine,"multiple use of section label '%s', (first occurrence: %s, line %d)",Doxygen::mainPage->name().data(),si->fileName.data(),si->lineNr); + } + else + { + warn(root->fileName,root->startLine,"multiple use of section label '%s', (first occurrence: %s)",Doxygen::mainPage->name().data(),si->fileName.data()); + } + } + else + { + // a page name is a label as well! but should no be double either + si=new SectionInfo( + indexName, root->startLine, Doxygen::mainPage->name(), Doxygen::mainPage->title(), SectionInfo::Page, 0); // level 0 - Doxygen::sectionDict->append(indexName,si); - Doxygen::mainPage->addSectionsToDefinition(root->anchors); + Doxygen::sectionDict->append(indexName,si); + Doxygen::mainPage->addSectionsToDefinition(root->anchors); + } } else { |