summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qdoc/htmlgenerator.cpp4
-rw-r--r--src/qdoc/qdocindexfiles.cpp7
-rw-r--r--src/qdoc/webxmlgenerator.cpp8
3 files changed, 12 insertions, 7 deletions
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
index 2114d6a8c..5bfa2daeb 100644
--- a/src/qdoc/htmlgenerator.cpp
+++ b/src/qdoc/htmlgenerator.cpp
@@ -1909,7 +1909,7 @@ void HtmlGenerator::generateNavigationBar(const QString &title,
const QString &buildversion,
bool tableItems)
{
- if (noNavigationBar)
+ if (noNavigationBar || node == nullptr)
return;
Text navigationbar;
@@ -2879,7 +2879,7 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
CodeMarker *marker,
const NodeMultiMap &nmm)
{
- if (nmm.isEmpty())
+ if (nmm.isEmpty() || relative == nullptr)
return;
generateAnnotatedList(relative, marker, nmm.values());
}
diff --git a/src/qdoc/qdocindexfiles.cpp b/src/qdoc/qdocindexfiles.cpp
index 9ea7d9f86..9ded66abb 100644
--- a/src/qdoc/qdocindexfiles.cpp
+++ b/src/qdoc/qdocindexfiles.cpp
@@ -157,6 +157,11 @@ void QDocIndexFiles::readIndexFile(const QString &path)
basesList_.clear();
NamespaceNode *root = qdb_->newIndexTree(project_);
+ if (!root) {
+ qWarning() << "Issue parsing index tree" << path;
+ return;
+ }
+
root->tree()->setIndexTitle(indexTitle);
// Scan all elements in the XML file, constructing a map that contains
@@ -387,7 +392,7 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader& reader,
} else
goto done;
- if (current && current->isExample()) {
+ if (current->isExample()) {
ExampleNode *en = static_cast<ExampleNode *>(current);
if (subtype == QDocAttrFile) {
en->appendFile(name);
diff --git a/src/qdoc/webxmlgenerator.cpp b/src/qdoc/webxmlgenerator.cpp
index 73f6f6268..4b649820f 100644
--- a/src/qdoc/webxmlgenerator.cpp
+++ b/src/qdoc/webxmlgenerator.cpp
@@ -289,6 +289,9 @@ const Atom *WebXMLGenerator::addAtomElements(QXmlStreamWriter &writer,
{
bool keepQuoting = false;
+ if (!atom)
+ return nullptr;
+
switch (atom->type()) {
case Atom::AnnotatedList:
{
@@ -750,11 +753,8 @@ const Atom *WebXMLGenerator::addAtomElements(QXmlStreamWriter &writer,
}
hasQuotingInformation = keepQuoting;
+ return atom->next();
- if (atom)
- return atom->next();
-
- return nullptr;
}
void WebXMLGenerator::startLink(QXmlStreamWriter &writer, const Atom *atom,