diff options
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/util.cpp b/src/util.cpp index 6b30584..dc75911 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6012,7 +6012,7 @@ found: PageDef *addRelatedPage(const char *name,const QCString &ptitle, const QCString &doc, - const char *fileName,int startLine, + const char *fileName,int startLine,int topLine, const RefItemVector &sli, GroupDef *gd, const TagInfo *tagInfo, @@ -6024,8 +6024,8 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, //printf("addRelatedPage(name=%s gd=%p)\n",name,gd); if ((pd=Doxygen::pageSDict->find(name)) && !tagInfo) { - if (!xref) warn(fileName,startLine,"multiple use of page label '%s', (other occurrence: %s, line: %d)", - name,pd->docFile().data(),pd->docLine()); + if (!xref) warn(fileName,topLine,"multiple use of page label '%s', (other occurrence: %s, line: %d)", + name,pd->docFile().data(),pd->topLine()); // append documentation block to the page. pd->setDocumentation(doc,fileName,startLine); //printf("Adding page docs '%s' pi=%p name=%s\n",doc.data(),pd,name); @@ -6041,7 +6041,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, baseName=baseName.left(baseName.length()-Doxygen::htmlFileExtension.length()); QCString title=ptitle.stripWhiteSpace(); - pd=createPageDef(fileName,startLine,baseName,doc,title); + pd=createPageDef(fileName,startLine,topLine,baseName,doc,title); pd->setRefItems(sli); pd->setLanguage(lang); @@ -6063,24 +6063,26 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, // a page name is a label as well! QCString file; + int line = -1; if (gd) { file=gd->getOutputFileBase(); } else { - file=pd->getOutputFileBase(); + file=pd->docFile(); + line = pd->topLine(); } const SectionInfo *si = SectionManager::instance().find(pd->name()); if (si) { if (si->lineNr() != -1) { - warn(file,-1,"multiple use of section label '%s', (first occurrence: %s, line %d)",pd->name().data(),si->fileName().data(),si->lineNr()); + warn(file,line,"multiple use of section label '%s', (first occurrence: %s, line %d)",pd->name().data(),si->fileName().data(),si->lineNr()); } else { - warn(file,-1,"multiple use of section label '%s', (first occurrence: %s)",pd->name().data(),si->fileName().data()); + warn(file,line,"multiple use of section label '%s', (first occurrence: %s)",pd->name().data(),si->fileName().data()); } } else |