summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-09-29 06:16:55 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-09-29 06:16:55 (GMT)
commitbaf6fc9f10aa751b786021ef9b23ac546881b699 (patch)
treed77bf8d7af5a592c3f8fc7fb70fa6514679950e3 /tools/qdoc3
parentdc741de083711e0089bd2fb5ed326a011f488830 (diff)
downloadQt-baf6fc9f10aa751b786021ef9b23ac546881b699.zip
Qt-baf6fc9f10aa751b786021ef9b23ac546881b699.tar.gz
Qt-baf6fc9f10aa751b786021ef9b23ac546881b699.tar.bz2
Improve error reporting when qdoc cannot open a source file.
Make the user's life easier by including the reason for the error in the failure message. Reviewed-by: Trust Me
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 4b5f0c6..ec5ce96 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -47,6 +47,7 @@
#include <qfile.h>
#include <stdio.h>
+#include <errno.h>
#include "codechunk.h"
#include "config.h"
@@ -281,7 +282,7 @@ void CppCodeParser::parseSourceFile(const Location& location,
{
FILE *in = fopen(QFile::encodeName(filePath), "r");
if (!in) {
- location.error(tr("Cannot open C++ source file '%1'").arg(filePath));
+ location.error(tr("Cannot open C++ source file '%1' (%2)").arg(filePath).arg(strerror(errno)));
return;
}