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 /src/outputlist.cpp | |
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
Diffstat (limited to 'src/outputlist.cpp')
-rw-r--r-- | src/outputlist.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
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; } |