summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorGeir Vattekar <geir.vattekar@nokia.com>2011-03-07 15:26:19 (GMT)
committerGeir Vattekar <geir.vattekar@nokia.com>2011-03-07 15:26:19 (GMT)
commit07ce2c31c3e020ad7c5ea4d7cc94296b6860adac (patch)
treec4de41a78dd5661adae5376860d1d1e52a6d40b4 /demos
parentea8a4080bfc341785c8852a66c90050f72a58e12 (diff)
downloadQt-07ce2c31c3e020ad7c5ea4d7cc94296b6860adac.zip
Qt-07ce2c31c3e020ad7c5ea4d7cc94296b6860adac.tar.gz
Qt-07ce2c31c3e020ad7c5ea4d7cc94296b6860adac.tar.bz2
Doc: QtDemo now gives error message when example doc cannot be loaded
Task-number: QTBUG-16004 Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'demos')
-rw-r--r--demos/qtdemo/examplecontent.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/qtdemo/examplecontent.cpp b/demos/qtdemo/examplecontent.cpp
index 64737c3..5385259 100644
--- a/demos/qtdemo/examplecontent.cpp
+++ b/demos/qtdemo/examplecontent.cpp
@@ -83,8 +83,10 @@ QString ExampleContent::loadDescription()
int errorLine, errorColumn;
QDomDocument exampleDoc;
- if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) {
- qDebug() << errorMsg << errorLine << errorColumn;
+ if (ba.isEmpty()) {
+ qDebug() << "No documentation found for" << name << "Is the documentation built?";
+ } else if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) {
+ qDebug() << "Error loading documentation for " << name << ": " << errorMsg << errorLine << errorColumn;
}
QDomNodeList paragraphs = exampleDoc.elementsByTagName("p");