summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-08-21 12:35:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-21 19:40:50 +0200
commit83fa4051d623c3c03a0e1b1cadfc63ce735c15e2 (patch)
tree0f07c842d19eada8502a56657ffc284b2c604752
parent676264e24db0b073a0f0e36b63f48267bb311918 (diff)
Continue processing the qhp file on missing attributes
qhelpgenerator would bail out with an error if a keyword would contain a missing or empty attribute. This can e.g. happen on a missing \relates in the documentation. This makes the whole help generation rather fragile, as CI doesn't stop these kind of errors from making it into the code base. So rather then failing to generate the docs simply skip the one keyword that the helpgenerator can't place into a context. Change-Id: I265dc75ba9b29c868d5b9cf8a9aae5ce880374b1 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
-rw-r--r--src/assistant/help/qhelpprojectdata.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/assistant/help/qhelpprojectdata.cpp b/src/assistant/help/qhelpprojectdata.cpp
index 6020293cd..9a229b042 100644
--- a/src/assistant/help/qhelpprojectdata.cpp
+++ b/src/assistant/help/qhelpprojectdata.cpp
@@ -233,10 +233,10 @@ void QHelpProjectDataPrivate::readKeywords()
if (name() == QLatin1String("keyword")) {
if (attributes().value(QLatin1String("ref")).toString().isEmpty()
|| (attributes().value(QLatin1String("name")).toString().isEmpty()
- && attributes().value(QLatin1String("id")).toString().isEmpty()))
- raiseError(QCoreApplication::translate("QHelpProject",
- "Missing attribute in keyword at line %1.")
- .arg(lineNumber()));
+ && attributes().value(QLatin1String("id")).toString().isEmpty())) {
+ qWarning("Missing attribute in keyword at line %d.", (int)lineNumber());
+ continue;
+ }
filterSectionList.last()
.addIndex(QHelpDataIndexItem(attributes().
value(QLatin1String("name")).toString(),