summaryrefslogtreecommitdiffstats
path: root/src/qdoc/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/node.cpp')
-rw-r--r--src/qdoc/node.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index 65c75e743..5415f14cd 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -4204,19 +4204,23 @@ void FunctionNode::addAssociatedProperty(PropertyNode *p)
}
/*!
- Returns true if this function has at least one property
- that is active, i.e. at least one property that is not
- obsolete.
- */
-bool FunctionNode::hasActiveAssociatedProperty() const
+ \reimp
+
+ Returns \c true if this is an access function for an obsolete property,
+ otherwise calls the base implementation of isObsolete().
+*/
+bool FunctionNode::isObsolete() const
{
- if (associatedProperties_.isEmpty())
- return false;
- for (const auto *property : qAsConst(associatedProperties_)) {
- if (!property->isObsolete())
- return true;
- }
- return false;
+ auto it = std::find_if_not(associatedProperties_.begin(),
+ associatedProperties_.end(),
+ [](const Node *p)->bool {
+ return p->isObsolete();
+ });
+
+ if (!associatedProperties_.isEmpty() && it == associatedProperties_.end())
+ return true;
+
+ return Node::isObsolete();
}
/*! \fn unsigned char FunctionNode::overloadNumber() const