summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@theqtcompany.com>2016-02-26 10:07:33 +0100
committerTopi Reiniƶ <topi.reinio@theqtcompany.com>2016-02-26 12:11:25 +0000
commitc2aa92049d1ed489824ae7e513cf9481939ddba3 (patch)
treee51aae8a65b2e59689164f6bf7bb11e08ce17a03
parent184c8f82a0b2e7ed8d307c796a5ba92b66723abe (diff)
qdoc: Clear node's URL and index flag when reparenting it
The new parent may be from another module, and therefore have a different output subfolder. Updating the output subfolder is not enough; if the URL has been set, it still contains the old, incorrect path. Likewise, when moving a node into a non-index node parent, its index node flag needs to be updated. Change-Id: Ic5dcfbe78e37cea0d657f27f500fa3c4c2fc091d Task-number: QTBUG-51414 Task-number: QTBUG-51358 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
-rw-r--r--src/qdoc/node.cpp2
-rw-r--r--src/qdoc/node.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index fe9d3527f..7384e8245 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -1254,6 +1254,8 @@ void Aggregate::addChild(Node *child)
if (child->parent() == 0) {
child->setParent(this);
child->setOutputSubdirectory(this->outputSubdirectory());
+ child->setUrl(QString());
+ child->setIndexNodeFlag(isIndexNode());
}
}
diff --git a/src/qdoc/node.h b/src/qdoc/node.h
index 2b208d48f..e76d940f9 100644
--- a/src/qdoc/node.h
+++ b/src/qdoc/node.h
@@ -188,7 +188,7 @@ public:
void setPageType(PageType t) { pageType_ = (unsigned char) t; }
void setPageType(const QString& t);
void setParent(Aggregate* n) { parent_ = n; }
- void setIndexNodeFlag() { indexNodeFlag_ = true; }
+ void setIndexNodeFlag(bool isIndexNode = true) { indexNodeFlag_ = isIndexNode; }
virtual void setOutputFileName(const QString& ) { }
bool isQmlNode() const { return genus() == QML; }