![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Typedefs | |
| using | SemanticOrigins = QList<QList<const Node *>> |
Functions | |
| IR::PageMetadata | extractPageMetadata (const PageNode *pn, const HrefResolver *hrefResolver, SemanticOrigins *origins) |
| IR::QmlTypeData | extractQmlTypeData (const QmlTypeNode *qcn, const HrefResolver *hrefResolver) |
| IR::CollectionData | extractCollectionData (const CollectionNode *cn, const HrefResolver *hrefResolver) |
| static QList< IR::SignatureSpan > | buildTemplateDeclSpans (const RelaxedTemplateDeclaration *templateDecl, const HrefResolver *hrefResolver, const Node *relative) |
| IR::CppReferenceData | extractCppReferenceData (const Aggregate *aggregate, const HrefResolver *hrefResolver) |
| QList< IR::SectionIR > | extractSummarySections (const Aggregate *aggregate, const HrefResolver *hrefResolver) |
| QList< IR::SectionIR > | extractDetailSections (const Aggregate *aggregate, const HrefResolver *hrefResolver, SemanticOrigins *origins) |
| static QString | threadSafenessString (Node::ThreadSafeness ts) |
| static void | qualifyEnumValueTerms (const EnumNode *en, QList< IR::ContentBlock > &blocks) |
| IR::MemberIR | extractMemberIR (const Node *node, const HrefResolver *hrefResolver, const Node *relative, MemberExtractionLevel level) |
| static QList< IR::SignatureSpan > | buildTypeSpans (const QString &typeString) |
| static QList< IR::SignatureSpan > | buildExtraSpans (const Node *node, Section::Style style) |
| static QList< IR::SignatureSpan > | buildCppSynopsisSpans (const Node *node, const HrefResolver *hrefResolver, const Node *relative, Section::Style style) |
| static QList< IR::SignatureSpan > | buildQmlItemSpans (const Node *node, const HrefResolver *hrefResolver, const Node *relative) |
| static QString | plainTextFromSpans (const QList< IR::SignatureSpan > &spans) |
| QList< IR::SignatureSpan > | buildSignatureSpans (const Node *node, const HrefResolver *hrefResolver, const Node *relative, Section::Style style) |
| static IR::AllMembersIR | extractQmlAllMembersIR (const QmlTypeNode *qcn, const HrefResolver *hrefResolver) |
| static IR::AllMembersIR | extractCppAllMembersIR (const Aggregate *aggregate, const HrefResolver *hrefResolver) |
| std::optional< IR::AllMembersIR > | extractAllMembersIR (const PageNode *pn, const HrefResolver *hrefResolver) |
| IR::NavigationData | extractNavigationData (const PageNode *pn, const HrefResolver *hrefResolver) |
| IR::MemberIR | extractMemberIR (const Node *node, const HrefResolver *hrefResolver, const Node *relative, MemberExtractionLevel level=MemberExtractionLevel::Summary) |
| QList< IR::SignatureSpan > | buildSignatureSpans (const Node *node, const HrefResolver *hrefResolver, const Node *relative, Section::Style style) |
| using NodeExtractor::SemanticOrigins = QList<QList<const Node *>> |
Definition at line 27 of file nodeextractor.h.
|
static |
Definition at line 1368 of file nodeextractor.cpp.
References Section::Accessors, Section::AllMembers, Parameters::at(), Class, Parameters::count(), Section::Details, Enum, Function, Node< _Tp >::isHeader(), Node< _Tp >::isProperty(), Node< _Tp >::isProxyNode(), Node< _Tp >::isQmlNode(), Node< _Tp >::isRelatedNonmember(), IR::Name, Namespace, Node< _Tp >::nodeType(), IR::Parameter, Node< _Tp >::parent(), Property, QmlProperty, IR::SignatureSpan::role, Struct, Section::Summary, IR::Text, TypeAlias, Typedef, Union, and Variable.
|
static |
Definition at line 1199 of file nodeextractor.cpp.
References IR::ExternalRef, IR::Extra, IR::SignatureSpan::role, and IR::Text.
|
static |
Build the signature spans for a QML member.
relative is the rendered documentation owner: the QML type whose page the signature appears on. Inherited members resolve their name link against that owner rather than the declaring type, because an internal base type generates no page of its own.
Definition at line 1684 of file nodeextractor.cpp.
References Parameters::at(), Parameters::count(), Node< _Tp >::isFunction(), Node< _Tp >::isQmlProperty(), IR::Name, IR::Parameter, IR::SignatureSpan::role, and IR::Text.
| QList< IR::SignatureSpan > NodeExtractor::buildSignatureSpans | ( | const Node * | node, |
| const HrefResolver * | hrefResolver, | ||
| const Node * | relative, | ||
| Section::Style | style ) |
Build structured signature spans from Node data.
This function produces a QList of SignatureSpan values that carry semantic roles (Type, Name, Parameter, Extra, and so on) for each element of a member's synopsis. It parallels what CppCodeMarker's markedUpSynopsis() and markedUpQmlItem() produce as tagged strings, but outputs structured IR spans instead.
The style parameter controls level of detail: Summary includes virtual/override qualifiers, Details adds template declarations and parent prefixes, AllMembers uses a condensed format.
Definition at line 1782 of file nodeextractor.cpp.
| QList< IR::SignatureSpan > NodeExtractor::buildSignatureSpans | ( | const Node * | node, |
| const HrefResolver * | hrefResolver, | ||
| const Node * | relative, | ||
| Section::Style | style ) |
|
static |
Definition at line 1246 of file nodeextractor.cpp.
References IR::SignatureSpan::role, IR::TemplateDecl, and IR::Text.
|
static |
Definition at line 1164 of file nodeextractor.cpp.
References IR::SignatureSpan::role, IR::Text, and IR::Type.
| std::optional< IR::AllMembersIR > NodeExtractor::extractAllMembersIR | ( | const PageNode * | pn, |
| const HrefResolver * | hrefResolver ) |
Extract all-members IR for a page node.
Dispatches to the QML or C++ extraction function based on the page type. Returns std::nullopt for page types that don't have member listing pages (generic pages, QML basic types) or when the listing would be empty.
Definition at line 1925 of file nodeextractor.cpp.
References Node< _Tp >::isAggregate(), Node< _Tp >::isClassNode(), Node< _Tp >::isNamespace(), and Node< _Tp >::isQmlType().
Referenced by TemplateGenerator::generateCppReferencePage(), and TemplateGenerator::generateQmlTypePage().
| IR::CollectionData NodeExtractor::extractCollectionData | ( | const CollectionNode * | cn, |
| const HrefResolver * | hrefResolver ) |
Extract collection metadata from a CollectionNode.
Populates module identity, CMake/qmake build variables, technology preview state, and pre-sorted member listings. For C++ modules, members are categorized into separate namespace and class lists. For groups and QML modules, a single flat member list is produced.
All member lists are filtered through InclusionFilter (excluding internal entries) and exclude deprecated nodes, then sorted alphabetically by name (case-insensitive).
Definition at line 490 of file nodeextractor.cpp.
References CollectionNode::getMembers(), Node< _Tp >::isClassNode(), IR::CollectionData::isConcept, Node< _Tp >::isConcept(), IR::CollectionData::isGroup, Node< _Tp >::isGroup(), IR::CollectionData::isModule, Node< _Tp >::isModule(), IR::CollectionData::isQmlModule, Node< _Tp >::isQmlModule(), Namespace, IR::CollectionData::noAutoList, and PageNode::noAutoList().
|
static |
Extract a flat all-members listing for a C++ class or namespace.
Constructs a Sections object from the aggregate, extracts allMembersSection().members(), builds AllMemberEntry for each visible member, and returns an AllMembersIR with isQmlType=false.
Definition at line 1882 of file nodeextractor.cpp.
References Sections::Sections(), Sections::allMembersSection(), Section::isEmpty(), and IR::AllMembersIR::isQmlType.
| IR::CppReferenceData NodeExtractor::extractCppReferenceData | ( | const Aggregate * | aggregate, |
| const HrefResolver * | hrefResolver ) |
Extract C++ reference page metadata from a class, namespace, or header.
Reads requisite table fields (header include, build-system snippets, status), inheritance hierarchies, template declarations, comparison operators, thread-safeness, and group associations. The result is a value-type struct that captures everything the template generator needs to render the requisites table and secondary sections without touching the Node tree at render time.
All three aggregate page types (ClassNode, NamespaceNode, HeaderNode) are handled, with ClassNode-specific sections gated on isClassNode().
Definition at line 601 of file nodeextractor.cpp.
References Node< _Tp >::comparisonCategory(), Node< _Tp >::doc(), QDocDatabase::groups(), Aggregate::hasObsoleteMembers(), IR::CppReferenceData::hasObsoleteMembers, Node< _Tp >::isClassNode(), IR::CppReferenceData::isHeader, Node< _Tp >::isHeader(), InclusionFilter::isIncluded(), IR::CppReferenceData::isInnerClass, IR::CppReferenceData::isNamespace, Node< _Tp >::isNamespace(), IR::CppReferenceData::isPartialNamespace, Module, Node< _Tp >::nodeNameLessThan(), Node< _Tp >::parent(), QDocDatabase::qdocDB(), IR::CppReferenceData::suppressInheritance, Node< _Tp >::templateDecl(), Node< _Tp >::threadSafeness(), and Node< _Tp >::UnspecifiedSafeness.
| QList< IR::SectionIR > NodeExtractor::extractDetailSections | ( | const Aggregate * | aggregate, |
| const HrefResolver * | hrefResolver, | ||
| SemanticOrigins * | origins = nullptr ) |
Build categorized detail sections for an aggregate node.
Iterates Sections::detailsSections() and extracts full member documentation including body content, anchor IDs, and metadata. SharedCommentNode groups share a single documentation body across their children, with each child getting its own anchorId and synopsis.
origins, when non-null, receives one entry per emitted detail member, paired with the member order of each emitted section: the node the member's detail documentation was authored on — the member itself, or the SharedCommentNode for copied shared text. A member without an anchorId maps to nullptr; its content resolves in page context. Emitted anchors are not unique (a QML type's regular and attached signal of the same name share one), so the pairing is positional rather than keyed by anchorId.
Definition at line 919 of file nodeextractor.cpp.
References Sections::Sections(), and Sections::detailsSections().
| IR::MemberIR NodeExtractor::extractMemberIR | ( | const Node * | node, |
| const HrefResolver * | hrefResolver, | ||
| const Node * | relative, | ||
| MemberExtractionLevel | level ) |
Build a MemberIR from a single Node.
Extracts identity, classification, and type-specific data from the node. FunctionNode provides signatures, parameters, and overload metadata. EnumNode provides scoped/unscoped signature and enum value listings. PropertyNode provides a qualified data type signature.
When level is MemberExtractionLevel::Detail, also populates detail documentation fields: anchorId, synopsis, since, threadSafety, comparisonCategory, noexcept metadata, body (via ContentBuilder), and alsoList.
Definition at line 1044 of file nodeextractor.cpp.
References IR::MemberIR::access, Node< _Tp >::access(), Parameters::at(), Doc::body(), Doc::briefText(), Node< _Tp >::comparisonCategory(), comparisonCategoryAsString(), Parameters::count(), Detail, Section::Details, Node< _Tp >::doc(), Text::firstAtom(), IR::MemberIR::isAttached, IR::MemberIR::isConst, IR::MemberIR::isDefault, Node< _Tp >::isEnumType(), Node< _Tp >::isFunction(), IR::MemberIR::isNoexcept, IR::MemberIR::isPrimaryOverload, Node< _Tp >::isProperty(), Node< _Tp >::isQmlProperty(), IR::MemberIR::isReadOnly, IR::MemberIR::isRequired, IR::MemberIR::isSignal, IR::MemberIR::isSlot, IR::MemberIR::isStatic, Node< _Tp >::isTypedef(), IR::MemberIR::isVirtual, IR::MemberIR::nodeType, Node< _Tp >::nodeType(), IR::MemberIR::overloadNumber, Node< _Tp >::SignatureDefaultValues, Node< _Tp >::SignatureReturnType, IR::MemberIR::status, Node< _Tp >::status(), Section::Summary, and Variable.
| IR::MemberIR NodeExtractor::extractMemberIR | ( | const Node * | node, |
| const HrefResolver * | hrefResolver, | ||
| const Node * | relative, | ||
| MemberExtractionLevel | level = MemberExtractionLevel::Summary ) |
| IR::NavigationData NodeExtractor::extractNavigationData | ( | const PageNode * | pn, |
| const HrefResolver * | hrefResolver ) |
Extract navigation metadata from a PageNode.
Reads navigation configuration values (homepage, landingpage, cppclassespage, qmltypespage) and the node's position in the documentation tree to produce a breadcrumb chain, sequential links (previous/next/start), and the configured TOC depth.
The breadcrumb chain follows page-type-specific logic ported from HtmlGenerator::generateNavigationBar(): static chain entries for API reference pages (class, QML type), a navigationParent() walk for generic pages with a 16-item circular reference cutoff, and a fallback to the first group page when no navigation parent exists.
Sequential links come from the node's pre-populated link map, set by QDocDatabase::updateNavigation() before generation runs.
Definition at line 1974 of file nodeextractor.cpp.
References IR::NavigationData::Current, QDocDatabase::getModuleNode(), Node< _Tp >::isClassNode(), Node< _Tp >::isQmlType(), PageNode::navigationParent(), QDocDatabase::qdocDB(), and IR::NavigationData::tocDepth.
Referenced by extractPageMetadata().
| IR::PageMetadata NodeExtractor::extractPageMetadata | ( | const PageNode * | pn, |
| const HrefResolver * | hrefResolver, | ||
| SemanticOrigins * | origins = nullptr ) |
\typealias NodeExtractor::SemanticOrigins
Page-local, never serialized: for each emitted detail section, one entry per emitted member in the same order, pointing at the node on which that member's detail documentation was authored. For a regular member the origin is the member itself; for a member of a SharedCommentNode group it is the SharedCommentNode, because the copied body and see-also text was authored in that comment. A member without an anchorId maps to nullptr, which the link resolver treats as "resolve in page context".
The list is paired with the extracted detail-section and member order rather than keyed by anchorId: emitted anchors are not unique, so two members (such as a QML type's regular and attached signal of the same name) can share one anchorId. The pairing travels beside the IR values, not inside them.
Extract page-level metadata from a PageNode into a value-type struct.
This function reads classification, identity, brief, and body fields from the given PageNode and returns them as an IR::PageMetadata value. Body content is populated via ContentBuilder, which transforms the atom chain into structured content blocks. Format-conditional atoms are skipped unconditionally since the template generator builds a format-agnostic IR.
For aggregate pages (classes, QML types, namespaces), member listings are extracted via the Sections infrastructure and stored as frozen SectionIR values.
The caller (TemplateGenerator) invokes this before passing the result to IR::Builder, ensuring Builder never includes PageNode or other Node subclass headers.
origins, when non-null, is populated alongside detail extraction with a page-local origin paired with each emitted detail member, in section and member order, for the template post-processing that resolves links in the authored member context.
Definition at line 288 of file nodeextractor.cpp.
References IR::PageMetadata::access, Node< _Tp >::access(), Class, Node< _Tp >::doc(), extractNavigationData(), Text::firstAtom(), IR::PageMetadata::genus, Node< _Tp >::genus(), Group, Node< _Tp >::isAggregate(), Node< _Tp >::isClassNode(), Node< _Tp >::isCollectionNode(), Node< _Tp >::isHeader(), Node< _Tp >::isNamespace(), Node< _Tp >::isQmlType(), Module, Namespace, IR::PageMetadata::nodeType, Node< _Tp >::nodeType(), Page, QmlModule, QmlType, QmlValueType, IR::PageMetadata::status, Node< _Tp >::status(), Struct, and Union.
|
static |
Extract a grouped all-members listing for a QML type.
Constructs a Sections object from the QmlTypeNode, extracts allMembersSection().classNodesList() to group members by originating QML type, and builds AllMemberEntry items with QML-specific hints and property group nesting.
Definition at line 1801 of file nodeextractor.cpp.
References Sections::allMembersSection(), Section::classNodesList(), Node< _Tp >::createContext(), and IR::AllMembersIR::isQmlType.
| IR::QmlTypeData NodeExtractor::extractQmlTypeData | ( | const QmlTypeNode * | qcn, |
| const HrefResolver * | hrefResolver ) |
Extract QML type metadata from a QmlTypeNode.
Populates import statement, inheritance chain, inherited-by list, native C++ type link, and singleton/value-type flags. InclusionFilter is applied to match the legacy generator's visibility filtering.
hasObsoleteMembers reports whether any section holds deprecated members, the same check the legacy QML generator applies before generating its obsolete sub-page. The check walks the section distribution rather than only direct children so members inherited from an abstract base type count as well.
Definition at line 401 of file nodeextractor.cpp.
References QmlTypeNode::classNode(), Node< _Tp >::createContext(), IR::QmlTypeData::hasObsoleteMembers, Sections::hasObsoleteMembers(), InclusionFilter::isIncluded(), Node< _Tp >::isQmlBasicType(), ClassNode::isQmlNativeType(), IR::QmlTypeData::isSingleton, QmlTypeNode::isSingleton(), IR::QmlTypeData::isValueType, QmlTypeNode::logicalModule(), QmlTypeNode::qmlBaseNode(), and QmlTypeNode::subclasses().
| QList< IR::SectionIR > NodeExtractor::extractSummarySections | ( | const Aggregate * | aggregate, |
| const HrefResolver * | hrefResolver ) |
Build categorized summary sections for an aggregate node.
Delegates to the Sections class for member distribution, then extracts results into frozen SectionIR values. The section variant (C++ class, QML type, or generic) is chosen based on the aggregate's node type.
Definition at line 849 of file nodeextractor.cpp.
References Sections::Sections(), and Sections::summarySections().
|
static |
Definition at line 1760 of file nodeextractor.cpp.
|
static |
Replace the text of each constant in the value tables of blocks with the value qualified to the enum's declaration scope, so that the template generators display the same constant names as the HTML, WebXML, and DocBook generators. Value tables of non-enum nodes, such as enumeration properties, keep their authored spelling.
Definition at line 1005 of file nodeextractor.cpp.
|
static |
Definition at line 985 of file nodeextractor.cpp.