diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-07-30 13:16:35 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-07-30 13:16:35 (GMT) |
commit | 4cca5f09948e314e14700c81dba8938ddaed814d (patch) | |
tree | 9e16d5e4af48cedcff38fb8402d057bfa0d2baad | |
parent | 11d4d687a83f1170514ea93e9dcad8c891b19df0 (diff) | |
parent | bee75b8faad42e45dea619bae8e61b264448184b (diff) | |
download | Doxygen-4cca5f09948e314e14700c81dba8938ddaed814d.zip Doxygen-4cca5f09948e314e14700c81dba8938ddaed814d.tar.gz Doxygen-4cca5f09948e314e14700c81dba8938ddaed814d.tar.bz2 |
Merge branch 'feature/bug_685714' of https://github.com/albert-github/doxygen into albert-github-feature/bug_685714
-rw-r--r-- | src/outputgen.h | 2 | ||||
-rw-r--r-- | src/outputlist.cpp | 35 | ||||
-rw-r--r-- | src/outputlist.h | 5 |
3 files changed, 20 insertions, 22 deletions
diff --git a/src/outputgen.h b/src/outputgen.h index e302f42..322f4b7 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -150,7 +150,7 @@ class BaseOutputDocInterface : public CodeOutputInterface Examples }; - virtual bool parseText(const QCString &s) { return s.isEmpty(); } + virtual void parseText(const QCString &s) {} /*! Start of a bullet list: e.g. \c \<ul\> in html. startItemListItem() is * Used for the bullet items. diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 0306f94..daf3270 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -128,14 +128,14 @@ void OutputList::popGeneratorState() } } -bool OutputList::generateDoc(const char *fileName,int startLine, +void OutputList::generateDoc(const char *fileName,int startLine, const Definition *ctx,const MemberDef * md, const QCString &docStr,bool indexWords, bool isExample,const char *exampleName, bool singleLine,bool linkFromIndex) { int count=0; - if (docStr.isEmpty()) return TRUE; + if (docStr.isEmpty()) return; QListIterator<OutputGenerator> it(m_outputs); OutputGenerator *og; @@ -143,20 +143,17 @@ bool OutputList::generateDoc(const char *fileName,int startLine, { if (og->isEnabled()) count++; } - if (count==0) return TRUE; // no output formats enabled. + // we want to validate irrespective of the number of output formats + // specified as: + // - when only XML format there should be warnings as well (XML has its own write routines) + // - no formats there should be warnings as well DocRoot *root=0; root = validatingParseDoc(fileName,startLine, ctx,md,docStr,indexWords,isExample,exampleName, singleLine,linkFromIndex); - - writeDoc(root,ctx,md); - - bool isEmpty = root->isEmpty(); - + if (count>0) writeDoc(root,ctx,md); delete root; - - return isEmpty; } void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md) @@ -172,7 +169,7 @@ void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *m VhdlDocGen::setFlowMember(0); } -bool OutputList::parseText(const QCString &textStr) +void OutputList::parseText(const QCString &textStr) { int count=0; QListIterator<OutputGenerator> it(m_outputs); @@ -181,20 +178,22 @@ bool OutputList::parseText(const QCString &textStr) { if (og->isEnabled()) count++; } - if (count==0) return TRUE; // no output formats enabled. + // we want to validate irrespective of the number of output formats + // specified as: + // - when only XML format there should be warnings as well (XML has its own write routines) + // - no formats there should be warnings as well DocText *root = validatingParseText(textStr); - for (it.toFirst();(og=it.current());++it) + if (count>0) { - if (og->isEnabled()) og->writeDoc(root,0,0); + for (it.toFirst();(og=it.current());++it) + { + if (og->isEnabled()) og->writeDoc(root,0,0); + } } - bool isEmpty = root->isEmpty(); - delete root; - - return isEmpty; } diff --git a/src/outputlist.h b/src/outputlist.h index 35d68a8..2a83020 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -74,13 +74,12 @@ class OutputList : public OutputDocInterface // OutputDocInterface implementation ////////////////////////////////////////////////// - bool generateDoc(const char *fileName,int startLine, + void generateDoc(const char *fileName,int startLine, const Definition *ctx,const MemberDef *md,const QCString &docStr, bool indexWords,bool isExample,const char *exampleName=0, bool singleLine=FALSE,bool linkFromIndex=FALSE); void writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md); - bool parseText(const QCString &textStr); - + void parseText(const QCString &textStr); void startIndexSection(IndexSections is) { forall(&OutputGenerator::startIndexSection,is); } |