Loading src/doxygen.cpp +25 −6 Original line number Original line Diff line number Diff line Loading @@ -8628,15 +8628,16 @@ static void buildPageList(EntryNav *rootNav) RECURSE_ENTRYTREE(buildPageList,rootNav); RECURSE_ENTRYTREE(buildPageList,rootNav); } } // search for the main page defined in this project static void findMainPage(EntryNav *rootNav) static void findMainPage(EntryNav *rootNav) { { if (rootNav->section() == Entry::MAINPAGEDOC_SEC) if (rootNav->section() == Entry::MAINPAGEDOC_SEC) { { rootNav->loadEntry(g_storage); rootNav->loadEntry(g_storage); Entry *root = rootNav->entry(); if (Doxygen::mainPage==0) if (Doxygen::mainPage==0 && rootNav->tagInfo()==0) { { Entry *root = rootNav->entry(); //printf("Found main page! \n======\n%s\n=======\n",root->doc.data()); //printf("Found main page! \n======\n%s\n=======\n",root->doc.data()); QCString title=root->args.stripWhiteSpace(); QCString title=root->args.stripWhiteSpace(); //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; Loading Loading @@ -8674,8 +8675,9 @@ static void findMainPage(EntryNav *rootNav) Doxygen::mainPage->addSectionsToDefinition(root->anchors); Doxygen::mainPage->addSectionsToDefinition(root->anchors); } } } } else else if (rootNav->tagInfo()==0) { { Entry *root = rootNav->entry(); warn(root->fileName,root->startLine, warn(root->fileName,root->startLine, "found more than one \\mainpage comment block! Skipping this " "found more than one \\mainpage comment block! Skipping this " "block." "block." Loading @@ -8687,6 +8689,22 @@ static void findMainPage(EntryNav *rootNav) RECURSE_ENTRYTREE(findMainPage,rootNav); RECURSE_ENTRYTREE(findMainPage,rootNav); } } // search for the main page imported via tag files and add only the section labels static void findMainPageTagFiles(EntryNav *rootNav) { if (rootNav->section() == Entry::MAINPAGEDOC_SEC) { rootNav->loadEntry(g_storage); if (Doxygen::mainPage && rootNav->tagInfo()) { Entry *root = rootNav->entry(); Doxygen::mainPage->addSectionsToDefinition(root->anchors); } } RECURSE_ENTRYTREE(findMainPageTagFiles,rootNav); } static void computePageRelations(EntryNav *rootNav) static void computePageRelations(EntryNav *rootNav) { { if ((rootNav->section()==Entry::PAGEDOC_SEC || if ((rootNav->section()==Entry::PAGEDOC_SEC || Loading Loading @@ -11083,6 +11101,7 @@ void parseInput() g_s.begin("Search for main page...\n"); g_s.begin("Search for main page...\n"); findMainPage(rootNav); findMainPage(rootNav); findMainPageTagFiles(rootNav); g_s.end(); g_s.end(); g_s.begin("Computing page relations...\n"); g_s.begin("Computing page relations...\n"); Loading src/tagreader.cpp +10 −13 Original line number Original line Diff line number Diff line Loading @@ -1430,11 +1430,9 @@ void TagFileParser::buildLists(Entry *root) QListIterator<TagPageInfo> pgit(m_tagFilePages); QListIterator<TagPageInfo> pgit(m_tagFilePages); TagPageInfo *tpi; TagPageInfo *tpi; for (pgit.toFirst();(tpi=pgit.current());++pgit) for (pgit.toFirst();(tpi=pgit.current());++pgit) { if (tpi->filename!="index") // skip mainpage, there can be only one (see bug734727) { { Entry *pe = new Entry; Entry *pe = new Entry; pe->section = Entry::PAGEDOC_SEC; pe->section = tpi->filename=="index" ? Entry::MAINPAGEDOC_SEC : Entry::PAGEDOC_SEC; pe->name = tpi->name; pe->name = tpi->name; pe->args = tpi->title; pe->args = tpi->title; addDocAnchors(pe,tpi->docAnchors); addDocAnchors(pe,tpi->docAnchors); Loading @@ -1445,7 +1443,6 @@ void TagFileParser::buildLists(Entry *root) root->addSubEntry(pe); root->addSubEntry(pe); } } } } } void TagFileParser::addIncludes() void TagFileParser::addIncludes() { { Loading Loading
src/doxygen.cpp +25 −6 Original line number Original line Diff line number Diff line Loading @@ -8628,15 +8628,16 @@ static void buildPageList(EntryNav *rootNav) RECURSE_ENTRYTREE(buildPageList,rootNav); RECURSE_ENTRYTREE(buildPageList,rootNav); } } // search for the main page defined in this project static void findMainPage(EntryNav *rootNav) static void findMainPage(EntryNav *rootNav) { { if (rootNav->section() == Entry::MAINPAGEDOC_SEC) if (rootNav->section() == Entry::MAINPAGEDOC_SEC) { { rootNav->loadEntry(g_storage); rootNav->loadEntry(g_storage); Entry *root = rootNav->entry(); if (Doxygen::mainPage==0) if (Doxygen::mainPage==0 && rootNav->tagInfo()==0) { { Entry *root = rootNav->entry(); //printf("Found main page! \n======\n%s\n=======\n",root->doc.data()); //printf("Found main page! \n======\n%s\n=======\n",root->doc.data()); QCString title=root->args.stripWhiteSpace(); QCString title=root->args.stripWhiteSpace(); //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; Loading Loading @@ -8674,8 +8675,9 @@ static void findMainPage(EntryNav *rootNav) Doxygen::mainPage->addSectionsToDefinition(root->anchors); Doxygen::mainPage->addSectionsToDefinition(root->anchors); } } } } else else if (rootNav->tagInfo()==0) { { Entry *root = rootNav->entry(); warn(root->fileName,root->startLine, warn(root->fileName,root->startLine, "found more than one \\mainpage comment block! Skipping this " "found more than one \\mainpage comment block! Skipping this " "block." "block." Loading @@ -8687,6 +8689,22 @@ static void findMainPage(EntryNav *rootNav) RECURSE_ENTRYTREE(findMainPage,rootNav); RECURSE_ENTRYTREE(findMainPage,rootNav); } } // search for the main page imported via tag files and add only the section labels static void findMainPageTagFiles(EntryNav *rootNav) { if (rootNav->section() == Entry::MAINPAGEDOC_SEC) { rootNav->loadEntry(g_storage); if (Doxygen::mainPage && rootNav->tagInfo()) { Entry *root = rootNav->entry(); Doxygen::mainPage->addSectionsToDefinition(root->anchors); } } RECURSE_ENTRYTREE(findMainPageTagFiles,rootNav); } static void computePageRelations(EntryNav *rootNav) static void computePageRelations(EntryNav *rootNav) { { if ((rootNav->section()==Entry::PAGEDOC_SEC || if ((rootNav->section()==Entry::PAGEDOC_SEC || Loading Loading @@ -11083,6 +11101,7 @@ void parseInput() g_s.begin("Search for main page...\n"); g_s.begin("Search for main page...\n"); findMainPage(rootNav); findMainPage(rootNav); findMainPageTagFiles(rootNav); g_s.end(); g_s.end(); g_s.begin("Computing page relations...\n"); g_s.begin("Computing page relations...\n"); Loading
src/tagreader.cpp +10 −13 Original line number Original line Diff line number Diff line Loading @@ -1430,11 +1430,9 @@ void TagFileParser::buildLists(Entry *root) QListIterator<TagPageInfo> pgit(m_tagFilePages); QListIterator<TagPageInfo> pgit(m_tagFilePages); TagPageInfo *tpi; TagPageInfo *tpi; for (pgit.toFirst();(tpi=pgit.current());++pgit) for (pgit.toFirst();(tpi=pgit.current());++pgit) { if (tpi->filename!="index") // skip mainpage, there can be only one (see bug734727) { { Entry *pe = new Entry; Entry *pe = new Entry; pe->section = Entry::PAGEDOC_SEC; pe->section = tpi->filename=="index" ? Entry::MAINPAGEDOC_SEC : Entry::PAGEDOC_SEC; pe->name = tpi->name; pe->name = tpi->name; pe->args = tpi->title; pe->args = tpi->title; addDocAnchors(pe,tpi->docAnchors); addDocAnchors(pe,tpi->docAnchors); Loading @@ -1445,7 +1443,6 @@ void TagFileParser::buildLists(Entry *root) root->addSubEntry(pe); root->addSubEntry(pe); } } } } } void TagFileParser::addIncludes() void TagFileParser::addIncludes() { { Loading