summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/qtdemo/examplecontent.cpp15
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf2
2 files changed, 12 insertions, 5 deletions
diff --git a/demos/qtdemo/examplecontent.cpp b/demos/qtdemo/examplecontent.cpp
index b93062c..19be3e0 100644
--- a/demos/qtdemo/examplecontent.cpp
+++ b/demos/qtdemo/examplecontent.cpp
@@ -79,14 +79,20 @@ void ExampleContent::animationStopped(int id)
QString ExampleContent::loadDescription()
{
QByteArray ba = MenuManager::instance()->getHtml(this->name);
+ QString errorMsg;
+ int errorLine, errorColumn;
QDomDocument exampleDoc;
- exampleDoc.setContent(ba, false);
+ if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) {
+ qDebug() << errorMsg << errorLine << errorColumn;
+ }
QDomNodeList paragraphs = exampleDoc.elementsByTagName("p");
if (paragraphs.length() < 1 && Colors::verbose)
- qDebug() << "- ExampleContent::loadDescription(): Could not load description:" << MenuManager::instance()->info[this->name]["docfile"];
- QString description = Colors::contentColor + QLatin1String("Could not load description. Ensure that the documentation for Qt is built.");
+ qDebug() << "- ExampleContent::loadDescription(): Could not load description:"
+ << MenuManager::instance()->info[this->name]["docfile"];
+ QString description = Colors::contentColor +
+ QLatin1String("Could not load description. Ensure that the documentation for Qt is built.");
for (int p = 0; p < int(paragraphs.length()); ++p) {
description = this->extractTextFromParagraph(paragraphs.item(p));
if (this->isSummary(description)) {
@@ -99,7 +105,8 @@ QString ExampleContent::loadDescription()
bool ExampleContent::isSummary(const QString &text)
{
return (!text.contains("[") &&
- text.indexOf(QRegExp(QString("(In )?((The|This) )?(%1 )?.*(tutorial|example|demo|application)").arg(this->name), Qt::CaseInsensitive)) != -1);
+ text.indexOf(QRegExp(QString("(In )?((The|This) )?(%1 )?.*(tutorial|example|demo|application)").arg(this->name),
+ Qt::CaseInsensitive)) != -1);
}
QString ExampleContent::extractTextFromParagraph(const QDomNode &parentNode)
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index b82e337..7ad78bd 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -11,7 +11,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
" <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearch\">\n" \
" <fieldset>\n" \
- " <input type=\"text\" value=\"\" id=\"pageType2\" name=\"searchstring\">\n" \
+ " <input type=\"text\" value=\"\" id=\"pageType2\" name=\"searchstring\"/>\n" \
" </fieldset>\n" \
" </form></div>\n" \
" <div id=\"nav-topright\">\n" \