diff options
-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 |