summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-03-25 14:02:42 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-03-27 13:39:42 +0000
commit58da6f96a84e6e140d384b2e422c0fdf020897ea (patch)
tree6f9b809f4174abc851e7f35199cd37390c77972f /src
parent49217e9657f2a47954b703d1d08077317b9e3c6d (diff)
qdoc: Add details to messages about not finding files.
Print example directories and files. Change-Id: I58553f45f87ec2c2036a8c4ddf9ffb54baa75870 Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/tools/qdoc/cppcodeparser.cpp7
-rw-r--r--src/tools/qdoc/doc.cpp5
2 files changed, 9 insertions, 3 deletions
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp
index bc24ff5daa..4fbe20b09e 100644
--- a/src/tools/qdoc/cppcodeparser.cpp
+++ b/src/tools/qdoc/cppcodeparser.cpp
@@ -2425,8 +2425,11 @@ void CppCodeParser::createExampleFileNodes(DocumentNode *dn)
proFileName,
userFriendlyFilePath);
if (fullPath.isEmpty()) {
- dn->location().warning(tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
- dn->location().warning(tr(" EXAMPLE PATH DOES NOT EXIST: %1").arg(examplePath));
+ QString details = QLatin1String("Example directories: ") + exampleDirs.join(QLatin1Char(' '));
+ if (!exampleFiles.isEmpty())
+ details += QLatin1String(", example files: ") + exampleFiles.join(QLatin1Char(' '));
+ dn->location().warning(tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName), details);
+ dn->location().warning(tr(" EXAMPLE PATH DOES NOT EXIST: %1").arg(examplePath), details);
return;
}
}
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index e911eed28b..92c6d405de 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -3305,7 +3305,10 @@ CodeMarker *Doc::quoteFromFile(const Location &location,
DocParser::exampleDirs,
fileName, userFriendlyFilePath);
if (filePath.isEmpty()) {
- location.warning(tr("Cannot find file to quote from: '%1'").arg(fileName));
+ QString details = QLatin1String("Example directories: ") + DocParser::exampleDirs.join(QLatin1Char(' '));
+ if (!DocParser::exampleFiles.isEmpty())
+ details += QLatin1String(", example files: ") + DocParser::exampleFiles.join(QLatin1Char(' '));
+ location.warning(tr("Cannot find file to quote from: '%1'").arg(fileName), details);
}
else {
QFile inFile(filePath);