diff options
author | albert-github <albert.tests@gmail.com> | 2020-09-24 15:58:43 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-09-24 15:58:43 (GMT) |
commit | 559fa499528fdbca05c05e0a39ccabd46c9edfc2 (patch) | |
tree | d01ce49ca170916e87c7bdae84e301c8315822e0 /src | |
parent | 17390b669f7a1017fa937410880da38a540dfa35 (diff) | |
download | Doxygen-559fa499528fdbca05c05e0a39ccabd46c9edfc2.zip Doxygen-559fa499528fdbca05c05e0a39ccabd46c9edfc2.tar.gz Doxygen-559fa499528fdbca05c05e0a39ccabd46c9edfc2.tar.bz2 |
Miscounting of lines in respect to page command
`file` was overwritten but this should not happen, onlt for warnings this would be OK.
Diffstat (limited to 'src')
-rw-r--r-- | src/util.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp index dc75911..42f68c5 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6063,14 +6063,17 @@ 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->docFile(); + file=pd->getOutputFileBase(); + orgFile=pd->docFile(); line = pd->topLine(); } const SectionInfo *si = SectionManager::instance().find(pd->name()); @@ -6078,11 +6081,11 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, { if (si->lineNr() != -1) { - warn(file,line,"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,line,"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 |