summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-10-03 17:58:34 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-10-03 17:58:34 (GMT)
commitbfbab402156582f47e939c53817f07ff0020faa6 (patch)
tree2271932a2f07f764259658866d9389a258747783 /src/util.cpp
parentd8c9381444b3f87b497dfd2442ba09c1085e1ebe (diff)
parent559fa499528fdbca05c05e0a39ccabd46c9edfc2 (diff)
downloadDoxygen-bfbab402156582f47e939c53817f07ff0020faa6.zip
Doxygen-bfbab402156582f47e939c53817f07ff0020faa6.tar.gz
Doxygen-bfbab402156582f47e939c53817f07ff0020faa6.tar.bz2
Merge branch 'feature/bug_md_pg_cnt' of https://github.com/albert-github/doxygen into albert-github-feature/bug_md_pg_cnt
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 8310862..84e197b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6004,7 +6004,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,
@@ -6016,8 +6016,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);
@@ -6033,7 +6033,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);
@@ -6055,24 +6055,29 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
// a page name is a label as well!
QCString file;
+ QCString orgFile;
+ int line = -1;
if (gd)
{
file=gd->getOutputFileBase();
+ orgFile=gd->getOutputFileBase();
}
else
{
file=pd->getOutputFileBase();
+ orgFile=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(orgFile,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(orgFile,line,"multiple use of section label '%s', (first occurrence: %s)",pd->name().data(),si->fileName().data());
}
}
else