18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
40 const QString &project,
41 const std::function<QString(
const Node *)> &prefixFn,
42 const std::function<QString(
const Node *)> &suffixFn)
44 QString base{node->name()};
45 if (base.endsWith(
".html"_L1))
46 base.truncate(base.size() - 5);
50 base.append(
"-qmlmodule"_L1);
52 base.append(
"-module"_L1);
53 base.append(suffixFn(node));
56 base.prepend(
"%1-"_L1.arg(project.toLower()));
57 base.append(
"-example"_L1);
61
62
63
64
65
66
67
68
70 const InclusionPolicy policy = Config::instance().createInclusionPolicy();
73 base.prepend(
"%1%2-"_L1.arg(node->logicalModuleName(), suffixFn(node)));
76 base.append(
"-%1-proxy"_L1.arg(node->tree()->physicalModuleName()));
81 const Node *pp = p->parent();
82 base.prepend(p->name());
83 if (pp ==
nullptr || pp->name().isEmpty() || pp->isTextPageNode())
88 if (node->isNamespace() && !node->name().isEmpty()) {
89 const auto *ns =
static_cast<
const NamespaceNode *>(node);
90 if (!ns->isDocumentedHere()) {
91 base.append(
"-sub-"_L1);
92 base.append(ns->tree()->camelCaseModuleName());
95 base.append(suffixFn(node));
98 base.prepend(prefixFn(node));
99 return asAsciiPrintable(base);
static bool isIncluded(const InclusionPolicy &policy, const NodeContext &context)
Combined button and popup list for selecting options.
This namespace holds QDoc-internal utility methods.
QString computeFileBase(const Node *node, const QString &project, const std::function< QString(const Node *)> &prefixFn, const std::function< QString(const Node *)> &suffixFn)
The Node class is the base class for all the nodes in QDoc's parse tree.
bool isQmlBasicType() const
Returns true if the node type is QmlBasicType.
bool isQmlType() const
Returns true if the node type is QmlType or QmlValueType.
virtual bool isTextPageNode() const
Returns true if the node is a PageNode but not an Aggregate.
bool isProxyNode() const
Returns true if the node type is Proxy.
NodeContext createContext() const
bool isModule() const
Returns true if the node type is Module.
virtual CollectionNode * logicalModule() const
If this is a QmlTypeNode, a pointer to its QML module is returned, which is a pointer to a Collection...
virtual bool isCollectionNode() const
Returns true if this is an instance of CollectionNode.
bool isQmlModule() const
Returns true if the node type is QmlModule.
bool isExample() const
Returns true if the node type is Example.