diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2015-10-24 17:48:18 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2015-10-24 21:56:27 (GMT) |
commit | af5c5b37c5464afb6a2df71edf6f9e82ece75187 (patch) | |
tree | a1aeaeaa1cff1c1d8f11c064f3006a48e82f134a /src | |
parent | 3a318681dc497127ebebd38a20a537c5dff74cc0 (diff) | |
download | Doxygen-af5c5b37c5464afb6a2df71edf6f9e82ece75187.zip Doxygen-af5c5b37c5464afb6a2df71edf6f9e82ece75187.tar.gz Doxygen-af5c5b37c5464afb6a2df71edf6f9e82ece75187.tar.bz2 |
Bug 755080 - xrefitem link to list incorrect when using SHORT_NAMES
Diffstat (limited to 'src')
-rw-r--r-- | src/context.cpp | 2 | ||||
-rw-r--r-- | src/docparser.cpp | 2 | ||||
-rw-r--r-- | src/doxygen.cpp | 4 | ||||
-rw-r--r-- | src/pagedef.cpp | 17 | ||||
-rw-r--r-- | src/pagedef.h | 2 | ||||
-rw-r--r-- | src/reflist.cpp | 8 | ||||
-rw-r--r-- | src/reflist.h | 2 | ||||
-rwxr-xr-x | src/util.cpp | 6 |
8 files changed, 20 insertions, 23 deletions
diff --git a/src/context.cpp b/src/context.cpp index e696981..2412010 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -10142,7 +10142,7 @@ void generateOutputViaTemplate() { // TODO: for LaTeX output index should be main... => solve in template Doxygen::mainPage = new PageDef("[generated]",1,"index","",theTranslator->trMainPage()); - Doxygen::mainPage->setFileName("index",TRUE); + Doxygen::mainPage->setFileName("index"); SharedPtr<PageContext> mainPage(PageContext::alloc(Doxygen::mainPage,TRUE,FALSE)); ctx->set("mainPage",mainPage.get()); } diff --git a/src/docparser.cpp b/src/docparser.cpp index c3963c9..13d1bfa 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -2171,7 +2171,7 @@ bool DocXRefItem::parse() } else { - m_file = convertNameToFile(refList->listName(),FALSE,TRUE); + m_file = refList->fileName(); m_anchor = item->listAnchor; } m_title = refList->sectionTitle(); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index f92d8b4..3341b3a 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -8704,7 +8704,7 @@ static void findMainPage(EntryNav *rootNav) indexName, root->brief+root->doc+root->inbodyDocs,title); //setFileNameForSections(root->anchors,"index",Doxygen::mainPage); Doxygen::mainPage->setBriefDescription(root->brief,root->briefFile,root->briefLine); - Doxygen::mainPage->setFileName(indexName,TRUE); + Doxygen::mainPage->setFileName(indexName); Doxygen::mainPage->setShowToc(root->stat); addPageToContext(Doxygen::mainPage,rootNav); @@ -8933,7 +8933,7 @@ static void buildExampleList(EntryNav *rootNav) PageDef *pd=new PageDef(root->fileName,root->startLine, root->name,root->brief+root->doc+root->inbodyDocs,root->args); pd->setBriefDescription(root->brief,root->briefFile,root->briefLine); - pd->setFileName(convertNameToFile(pd->name()+"-example",FALSE,TRUE),FALSE); + pd->setFileName(convertNameToFile(pd->name()+"-example",FALSE,TRUE)); pd->addSectionsToDefinition(root->anchors); pd->setLanguage(root->lang); //pi->addSections(root->anchors); diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 18a8205..20ace23 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -34,6 +34,8 @@ PageDef::PageDef(const char *f,int l,const char *n, m_subPageDict = new PageSDict(7); m_pageScope = 0; m_nestingLevel = 0; + static bool shortNames = Config_getBool("SHORT_NAMES"); + m_fileName = shortNames ? convertNameToFile(n) : QCString(n); m_showToc = FALSE; } @@ -61,20 +63,11 @@ QCString PageDef::getOutputFileBase() const return m_fileName; } -void PageDef::setFileName(const char *name,bool dontEscape) -{ - static bool shortNames = Config_getBool("SHORT_NAMES"); - if (shortNames && !dontEscape) - { - m_fileName = convertNameToFile(name); - } - else - { - m_fileName = name; - } +void PageDef::setFileName(const char *name) +{ + m_fileName = name; } - void PageDef::addInnerCompound(Definition *def) { if (def->definitionType()==Definition::TypePage) diff --git a/src/pagedef.h b/src/pagedef.h index c3e54a3..41b84cb 100644 --- a/src/pagedef.h +++ b/src/pagedef.h @@ -33,7 +33,7 @@ class PageDef : public Definition ~PageDef(); // setters - void setFileName(const char *name,bool dontEscape); + void setFileName(const char *name); void setShowToc(bool b); // getters diff --git a/src/reflist.cpp b/src/reflist.cpp index 8b41caa..8380db7 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -37,6 +37,7 @@ RefList::RefList(const char *listName, m_dictIterator = 0; m_id = 0; m_listName = listName; + m_fileName = convertNameToFile(listName,FALSE,TRUE); m_pageTitle = pageTitle; m_secTitle = secTitle; } @@ -99,6 +100,11 @@ QCString RefList::listName() const return m_listName; } +QCString RefList::fileName() const +{ + return m_fileName; +} + QCString RefList::pageTitle() const { return m_pageTitle; @@ -174,6 +180,6 @@ void RefList::generatePage() } doc += "</dl>\n"; //printf("generatePage('%s')\n",doc.data()); - addRelatedPage(m_listName,m_pageTitle,doc,0,m_listName,1,0,0,0); + addRelatedPage(m_listName,m_pageTitle,doc,0,m_fileName,1,0,0,0); } diff --git a/src/reflist.h b/src/reflist.h index 0d40e80..d064c58 100644 --- a/src/reflist.h +++ b/src/reflist.h @@ -72,6 +72,7 @@ class RefList RefItem *getFirstRefItem(); RefItem *getNextRefItem(); QCString listName() const; + QCString fileName() const; QCString pageTitle() const; QCString sectionTitle() const; @@ -85,6 +86,7 @@ class RefList private: int m_id; QCString m_listName; + QCString m_fileName; QCString m_pageTitle; QCString m_secTitle; SortedRefItems *m_itemList; diff --git a/src/util.cpp b/src/util.cpp index 3ea10ee..8472f3a 100755 --- a/src/util.cpp +++ b/src/util.cpp @@ -6396,11 +6396,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, if (tagInfo) { pd->setReference(tagInfo->tagName); - pd->setFileName(tagInfo->fileName,TRUE); - } - else - { - pd->setFileName(convertNameToFile(pd->name(),FALSE,TRUE),FALSE); + pd->setFileName(tagInfo->fileName); } //printf("Appending page `%s'\n",baseName.data()); |