summaryrefslogtreecommitdiffstats
path: root/demos/qtdemo/examplecontent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'demos/qtdemo/examplecontent.cpp')
-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");