diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-08-07 08:53:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 08:53:05 (GMT) |
commit | b676f2009ba9e6e953f9e3a999342b7dad79b1bf (patch) | |
tree | f116fe444a70b474c5dd90619155145322498cb8 /src/docparser.cpp | |
parent | 84a7e93dfeae1cb34d24c73caea3ac3679f5f724 (diff) | |
parent | 734bcd7e321c5584d388e9e5412e27af3a62cb43 (diff) | |
download | Doxygen-b676f2009ba9e6e953f9e3a999342b7dad79b1bf.zip Doxygen-b676f2009ba9e6e953f9e3a999342b7dad79b1bf.tar.gz Doxygen-b676f2009ba9e6e953f9e3a999342b7dad79b1bf.tar.bz2 |
Merge pull request #7084 from albert-github/feature/bug_img_ambig
Missing warning about ambiguous files
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r-- | src/docparser.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index baa22b4..550aba2 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -287,7 +287,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool bool ambig; FileDef *fd; //printf("Search for %s\n",fileName); - if ((fd=findFileDef(Doxygen::imageNameDict,fileName,ambig))) + if ((fd=findFileDef(Doxygen::imageNameDict,fileName,ambig)) && !ambig) { QCString inputFile = fd->absFilePath(); QFile inImage(inputFile); @@ -378,13 +378,16 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool return baseName; } } - else if (ambig && dowarn) + else if (ambig) { - QCString text; - text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName)); - text+="Possible candidates:\n"; - text+=showFileDefMatches(Doxygen::imageNameDict,fileName); - warn_doc_error(g_fileName,doctokenizerYYlineno,text); + if (dowarn) + { + QCString text; + text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName)); + text+="Possible candidates:\n"; + text+=showFileDefMatches(Doxygen::imageNameDict,fileName); + warn_doc_error(g_fileName,doctokenizerYYlineno,text); + } } else { @@ -1842,7 +1845,7 @@ static void readTextFileByName(const QCString &file,QCString &text) // as a fallback we also look in the exampleNameDict bool ambig; FileDef *fd; - if ((fd=findFileDef(Doxygen::exampleNameDict,file,ambig))) + if ((fd=findFileDef(Doxygen::exampleNameDict,file,ambig)) && !ambig) { text = fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES)); } @@ -2744,7 +2747,7 @@ bool DocDotFile::parse() { fd = findFileDef(Doxygen::dotFileNameDict,m_name+".dot",ambig); } - if (fd) + if (fd && !ambig) { m_file = fd->absFilePath(); ok = true; @@ -2753,7 +2756,7 @@ bool DocDotFile::parse() { warn_doc_error(g_fileName,doctokenizerYYlineno,"included dot file name %s is ambiguous.\n" "Possible candidates:\n%s",qPrint(m_name), - qPrint(showFileDefMatches(Doxygen::exampleNameDict,m_name)) + qPrint(showFileDefMatches(Doxygen::dotFileNameDict,m_name)) ); } else @@ -2781,7 +2784,7 @@ bool DocMscFile::parse() { fd = findFileDef(Doxygen::mscFileNameDict,m_name+".msc",ambig); } - if (fd) + if (fd && !ambig) { m_file = fd->absFilePath(); ok = true; @@ -2790,7 +2793,7 @@ bool DocMscFile::parse() { warn_doc_error(g_fileName,doctokenizerYYlineno,"included msc file name %s is ambiguous.\n" "Possible candidates:\n%s",qPrint(m_name), - qPrint(showFileDefMatches(Doxygen::exampleNameDict,m_name)) + qPrint(showFileDefMatches(Doxygen::mscFileNameDict,m_name)) ); } else @@ -2820,7 +2823,7 @@ bool DocDiaFile::parse() { fd = findFileDef(Doxygen::diaFileNameDict,m_name+".dia",ambig); } - if (fd) + if (fd && !ambig) { m_file = fd->absFilePath(); ok = true; @@ -2829,7 +2832,7 @@ bool DocDiaFile::parse() { warn_doc_error(g_fileName,doctokenizerYYlineno,"included dia file name %s is ambiguous.\n" "Possible candidates:\n%s",qPrint(m_name), - qPrint(showFileDefMatches(Doxygen::exampleNameDict,m_name)) + qPrint(showFileDefMatches(Doxygen::diaFileNameDict,m_name)) ); } else |