diff options
author | Topi Reinio <[email protected]> | 2015-08-19 13:18:39 +0200 |
---|---|---|
committer | Topi Reiniƶ <[email protected]> | 2015-08-19 12:06:00 +0000 |
commit | 2473f4fac31fae8b40be0975fbf41b115333bda8 (patch) | |
tree | 209aded61189e9240860e515656da2c1cf1e8463 /src/tools/qdoc/node.cpp | |
parent | d558100aa71f714342526c072005ad3bcef88d0f (diff) |
qdoc: Check and warn if \relates is used incorrectly
There are instances in the documentation where a member function
tries to set itself also a related non-member of its parent. This
should be treated as invalid behavior, as it likely causes also
problems during deletion of the node tree.
QDoc now checks for and warns about these instances.
Change-Id: I951e0de6be4d48618c60b8a0382e2c70700cc402
Task-number: QTBUG-47751
Reviewed-by: Martin Smith <[email protected]>
Diffstat (limited to 'src/tools/qdoc/node.cpp')
-rw-r--r-- | src/tools/qdoc/node.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index c879d1d9b41..1fe0af352dc 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -480,6 +480,9 @@ bool Node::fromFlagValue(FlagValue fv, bool defaultValue) */ void Node::setRelates(Aggregate *pseudoParent) { + if (pseudoParent == parent()) + return; + removeRelates(); relatesTo_ = pseudoParent; pseudoParent->addRelated(this); |