Permalink
Browse files

Bug 755080 - xrefitem link to list incorrect when using SHORT_NAMES

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Oct 24, 2015
1 parent 3a31868 commit af5c5b37c5464afb6a2df71edf6f9e82ece75187
Showing with 20 additions and 23 deletions.
  1. +1 −1 src/context.cpp
  2. +1 −1 src/docparser.cpp
  3. +2 −2 src/doxygen.cpp
  4. +5 −12 src/pagedef.cpp
  5. +1 −1 src/pagedef.h
  6. +7 −1 src/reflist.cpp
  7. +2 −0 src/reflist.h
  8. +1 −5 src/util.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());
}
@@ -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();
@@ -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);
@@ -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)
@@ -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
@@ -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);
}
@@ -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;
@@ -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());

0 comments on commit af5c5b3

Please sign in to comment.