diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-08-24 18:31:30 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-08-24 18:31:30 (GMT) |
commit | 745955f576cbd7b5f7601c55937d9c42db8161e8 (patch) | |
tree | 0e25070a82332a8c68e61938df6d7258d4a1d481 /src/index.cpp | |
parent | fdd1c3f1527b15f6b0a25c2d99748f6a8adc5fcf (diff) | |
download | Doxygen-745955f576cbd7b5f7601c55937d9c42db8161e8.zip Doxygen-745955f576cbd7b5f7601c55937d9c42db8161e8.tar.gz Doxygen-745955f576cbd7b5f7601c55937d9c42db8161e8.tar.bz2 |
Bug 735145 - QHP toc broken if mainpage with PROJECT_NAME title has sections/subpages
Diffstat (limited to 'src/index.cpp')
-rw-r--r-- | src/index.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/index.cpp b/src/index.cpp index 430f5af..c1c2837 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -3079,6 +3079,17 @@ static void countRelatedPages(int &docPages,int &indexPages) //---------------------------------------------------------------------------- +static bool mainPageHasOwnTitle() +{ + static QCString projectName = Config_getString("PROJECT_NAME"); + QCString title; + if (Doxygen::mainPage) + { + title = filterTitle(Doxygen::mainPage->title()); + } + return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0; +} + static void writePages(PageDef *pd,FTVHelp *ftv) { //printf("writePages()=%s pd=%p mainpage=%p\n",pd->name().data(),pd,Doxygen::mainPage); @@ -3115,8 +3126,8 @@ static void writePages(PageDef *pd,FTVHelp *ftv) } } if (hasSubPages && ftv) ftv->incContentsDepth(); - bool doIndent = (hasSections || hasSubPages) && - (pd!=Doxygen::mainPage || mainPageHasTitle()); + bool doIndent = (hasSections || hasSubPages) && + (pd!=Doxygen::mainPage || mainPageHasOwnTitle()); if (doIndent) { Doxygen::indexList->incContentsDepth(); |