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
anchorid.cpp File Reference

(0d2029604e95096647b2aafeee0d401083c67b95)

#include "anchorid.h"
#include "functionnode.h"
#include "node.h"
#include "propertynode.h"
#include "typedefnode.h"
Include dependency graph for anchorid.cpp:

Go to the source code of this file.

Functions

QT_BEGIN_NAMESPACE QString computeAnchorId (const Node *node)

Function Documentation

◆ computeAnchorId()

QT_BEGIN_NAMESPACE QString computeAnchorId ( const Node * node)

Computes the raw anchor base for node based on its type.

QML properties receive a {-prop} or {-attached-prop} suffix, signals receive {-signal}, methods receive {-method} with an optional overload number, and so on. The returned string isn't sanitized — each caller applies its own cleanup or finalization (such as Generator::cleanRef() or HrefResolverConfig::cleanRefFn).

Both HrefResolver::anchorForNode() and XmlGenerator::refForNode() delegate to this function for the shared node-type dispatch, ensuring consistent anchor naming across the IR extraction and legacy generation paths.

Definition at line 30 of file anchorid.cpp.