Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
aggregate.cpp File Reference

(bdaa3c0108e966178fccc61b8d7d04dfffdf27d1)

#include "aggregate.h"
#include "config.h"
#include "functionnode.h"
#include "inclusionfilter.h"
#include "inclusionpolicy.h"
#include "parameters.h"
#include "typedefnode.h"
#include "qdocdatabase.h"
#include "qmlpropertynode.h"
#include "qmltypenode.h"
#include "sharedcommentnode.h"
#include <QtCore/qspan.h>
#include <vector>
Include dependency graph for aggregate.cpp:

Go to the source code of this file.

Functions

static void warnAboutDocumentedChildInUndocumentedParent (const Node *aggregate, const Node *child)
static void addToRelatedTarget (Node *node, const QString &targettarget)
static bool keep (FunctionNode *fn)

Function Documentation

◆ addToRelatedTarget()

void addToRelatedTarget ( Node * node,
const QString & target )
static

Adds node to the list of related non-members of the aggregate target, without adopting it. The node remains documented under its parent, and the documentation of target links to it.

If target resolves to an aggregate in an index file, records the relationship in the node's tree instead, so that it is written to the index file of this module. The module that documents target can then link to the node.

If node is a shared comment node, adds each node in its collective instead. Does nothing if target resolves to the node's parent. If target is not found, reports it.

See also
Tree::addExternalRelates()

Definition at line 353 of file aggregate.cpp.

References Location::Location(), Node< _Tp >::parent(), and QDocDatabase::qdocDB().

Here is the call graph for this function:

◆ keep()

bool keep ( FunctionNode * fn)
static

Definition at line 674 of file aggregate.cpp.

References FunctionNode::isDeprecated(), FunctionNode::isDtor(), Node< _Tp >::isInternal(), Node< _Tp >::isPrivate(), and FunctionNode::isSomeCtor().

Here is the call graph for this function:

◆ warnAboutDocumentedChildInUndocumentedParent()

void warnAboutDocumentedChildInUndocumentedParent ( const Node * aggregate,
const Node * child )
static

Warn about documented, non-private children under undocumented parents, unless:

\list

  • The child's parent() doesn't match aggregate (indicating a related non-member), to avoid duplicate warnings as the node appears under multiple aggregates.
  • The child is private (private members don't generate output).
  • The child has Internal or InternalAuto status (we check the child's own status, not inherited internal status from the parent).
  • The parent is a proxy node (automatically generated, no documentation).
  • The parent is a namespace node (handled separately by NamespaceNode::reportDocumentedChildrenInUndocumentedNamespace()).
  • The parent is marked with the {\dontdocument} command.
  • The child is marked with the {\dontdocument} command.
  • The child has auto-generated documentation. These docs are created by QDoc, not written by a human, so warning about them would be confusing.
  • The {-showinternal} command-line option is set (internal nodes generate output, so the warning is not needed).
  • The {-no-linkerrors} command-line option is set (avoids false positives when the aggregate is documented outside the current project).
  • The file path of the child declaration matches internalfilepatterns. \endlist
Note
We check {child->status()} directly rather than {child->isInternal()} because {isInternal()} also considers the parent's status. Since the parent is undocumented (and thus marked InternalAuto), {isInternal()} would incorrectly return true for all children, suppressing the warning entirely.
See also
NamespaceNode::reportDocumentedChildrenInUndocumentedNamespace()

Definition at line 270 of file aggregate.cpp.

References Node< _Tp >::declLocation(), Node< _Tp >::doc(), Node< _Tp >::genus(), Node< _Tp >::hasDoc(), Internal, InternalAuto, Doc::isAutoGenerated(), Node< _Tp >::isDontDocument(), Location::isEmpty(), Node< _Tp >::isNamespace(), Node< _Tp >::isPrivate(), Node< _Tp >::isProxyNode(), Doc::location(), Node< _Tp >::parent(), InclusionFilter::processInternalDocs(), and Node< _Tp >::status().

Here is the call graph for this function: