diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-27 20:41:30 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-27 20:42:43 (GMT) |
commit | a292601d5d06cf5993247f2f7a6bc7306997da23 (patch) | |
tree | c79712972c87d360b0c19c526cc9db1498ee34ba /src/outputlist.cpp | |
parent | 6de91dc5e32e6d97a557fe6910a6cbf1d453ad9c (diff) | |
download | Doxygen-a292601d5d06cf5993247f2f7a6bc7306997da23.zip Doxygen-a292601d5d06cf5993247f2f7a6bc7306997da23.tar.gz Doxygen-a292601d5d06cf5993247f2f7a6bc7306997da23.tar.bz2 |
Issue #8206: Incorrect XHTML results
Changes:
- Change TooltipManager back into a singleton
- Give the OutputList object a unique output id
- Increment the id at each startFile() atomically
- Pass the id to the HTML code generator
- Store tooltips per output id.
- Keep track of tooltips that are already written for a given id
- for output formats other than HTML the output id is 0 and tooltips are
not collected and written
Diffstat (limited to 'src/outputlist.cpp')
-rw-r--r-- | src/outputlist.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 3e05dac..f968c8b 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -29,15 +29,19 @@ #include "definition.h" #include "docparser.h" #include "vhdldocgen.h" +#include "doxygen.h" +static AtomicInt g_outId; OutputList::OutputList() { + newId(); //printf("OutputList::OutputList()\n"); } OutputList::OutputList(const OutputList &ol) { + m_id = ol.m_id; for (const auto &og : ol.m_outputs) { m_outputs.emplace_back(og->clone()); @@ -48,6 +52,7 @@ OutputList &OutputList::operator=(const OutputList &ol) { if (this!=&ol) { + m_id = ol.m_id; for (const auto &og : ol.m_outputs) { m_outputs.emplace_back(og->clone()); @@ -61,6 +66,11 @@ OutputList::~OutputList() //printf("OutputList::~OutputList()\n"); } +void OutputList::newId() +{ + m_id = ++g_outId; +} + void OutputList::disableAllBut(OutputGenerator::OutputType o) { for (const auto &og : m_outputs) @@ -150,17 +160,17 @@ void OutputList::generateDoc(const char *fileName,int startLine, root = validatingParseDoc(fileName,startLine, ctx,md,docStr,indexWords,isExample,exampleName, singleLine,linkFromIndex,markdownSupport); - if (count>0) writeDoc(root,ctx,md); + if (count>0) writeDoc(root,ctx,md,m_id); delete root; } -void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md) +void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md,int) { for (const auto &og : m_outputs) { //printf("og->printDoc(extension=%s)\n", // ctx?ctx->getDefFileExtension().data():"<null>"); - if (og->isEnabled()) og->writeDoc(root,ctx,md); + if (og->isEnabled()) og->writeDoc(root,ctx,md,m_id); } VhdlDocGen::setFlowMember(0); } @@ -183,7 +193,7 @@ void OutputList::parseText(const QCString &textStr) { for (const auto &og : m_outputs) { - if (og->isEnabled()) og->writeDoc(root,0,0); + if (og->isEnabled()) og->writeDoc(root,0,0,m_id); } } |