From c2aa92049d1ed489824ae7e513cf9481939ddba3 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 26 Feb 2016 10:07:33 +0100 Subject: 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 --- src/qdoc/node.cpp | 2 ++ src/qdoc/node.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3