32#include <QtCore/qxmlstream.h>
49
50
51
52
53
56
57
58
59
60
61
62
65
66
67
70
71
72
75
76
77
80
81
82
85
86
87
88
89
90
91
92
95
96
97
98
99
102
103
104
109
110
117
118
125
126
127
130 if (s_qdocIndexFiles ==
nullptr)
132 return s_qdocIndexFiles;
136
137
140 if (s_qdocIndexFiles !=
nullptr) {
141 delete s_qdocIndexFiles;
142 s_qdocIndexFiles =
nullptr;
147
148
151 for (
const QString &file : indexFiles) {
152 qCDebug(lcQdoc) <<
"Loading index file: " << file;
158
159
165 if (!file.open(QFile::ReadOnly)) {
166 qWarning() <<
"Could not read index file" << path;
170 QXmlStreamReader reader(&file);
171 reader.setNamespaceProcessing(
false);
173 if (!reader.readNextStartElement())
176 if (reader.name() != QLatin1String(
"INDEX"))
179 QXmlStreamAttributes attrs = reader.attributes();
181 QString indexUrl {attrs.value(QLatin1String(
"url")).toString()};
188 if (!Config::installDir.isEmpty() && indexUrl == Config::instance().get(
CONFIG_URL).asString()) {
191 QDir installDir(path.section(
'/', 0, -3) +
'/' + Generator::outputSubdir());
192 indexUrl = installDir.relativeFilePath(path).section(
'/', 0, -2);
194 state.project = attrs.value(QLatin1String(
"project")).toString();
195 QString indexTitle = attrs.value(QLatin1String(
"indexTitle")).toString();
199 qWarning() <<
"Issue parsing index tree" << path;
203 root
->tree()->setIndexTitle(indexTitle);
207 while (reader.readNextStartElement()) {
208 readIndexSection(reader, root, indexUrl, state);
217
218
219
220
221
223 const QString &indexUrl, ReadState &state)
225 QXmlStreamAttributes attributes = reader.attributes();
226 QStringView elementName = reader.name();
228 QString name = attributes.value(QLatin1String(
"name")).toString();
229 QString href = attributes.value(QLatin1String(
"href")).toString();
233 bool hasReadChildren =
false;
235 if (current->isAggregate())
236 parent =
static_cast<Aggregate *>(current);
238 if (attributes.hasAttribute(QLatin1String(
"related"))) {
239 bool isIntTypeRelatedValue =
false;
240 int relatedIndex = attributes.value(QLatin1String(
"related")).toInt(&isIntTypeRelatedValue);
241 if (isIntTypeRelatedValue) {
242 if (adoptRelatedNode(parent, relatedIndex, state)) {
243 reader.skipCurrentElement();
247 QList<Node *>::iterator nodeIterator =
248 std::find_if(state.relatedNodes.begin(), state.relatedNodes.end(), [&](
const Node *relatedNode) {
249 return (name == relatedNode->name() && href == relatedNode->url().section(QLatin1Char(
'/'), -1));
252 if (nodeIterator != state.relatedNodes.end() && parent) {
254 reader.skipCurrentElement();
262 if (attributes.hasAttribute(QLatin1String(
"filepath"))) {
263 filePath = attributes.value(QLatin1String(
"filepath")).toString();
264 lineNo = attributes.value(
"lineno").toInt();
266 if (parent && elementName == QLatin1String(
"namespace")) {
268 node = namespaceNode;
269 if (!indexUrl.isEmpty())
270 location
= Location(indexUrl + QLatin1Char(
'/') + name.toLower() +
".html");
271 else if (!indexUrl.isNull())
272 location
= Location(name.toLower() +
".html");
273 }
else if (parent && (elementName == QLatin1String(
"class") || elementName == QLatin1String(
"struct")
274 || elementName == QLatin1String(
"union"))) {
276 if (elementName == QLatin1String(
"class"))
278 else if (elementName == QLatin1String(
"struct"))
280 else if (elementName == QLatin1String(
"union"))
282 node =
new ClassNode(type, parent, name);
283 if (attributes.hasAttribute(QLatin1String(
"bases"))) {
284 QString bases = attributes.value(QLatin1String(
"bases")).toString();
285 if (!bases.isEmpty())
287 std::pair<ClassNode *, QString>(
static_cast<ClassNode *>(node), bases));
289 if (!indexUrl.isEmpty())
290 location
= Location(indexUrl + QLatin1Char(
'/') + name.toLower() +
".html");
291 else if (!indexUrl.isNull())
292 location
= Location(name.toLower() +
".html");
293 bool abstract =
false;
294 if (attributes.value(QLatin1String(
"abstract")) == QLatin1String(
"true"))
297 }
else if (parent && elementName == QLatin1String(
"header")) {
300 if (attributes.hasAttribute(QLatin1String(
"location")))
301 name = attributes.value(QLatin1String(
"location")).toString();
303 if (!indexUrl.isEmpty())
304 location
= Location(indexUrl + QLatin1Char(
'/') + name);
305 else if (!indexUrl.isNull())
307 }
else if (parent && ((elementName == QLatin1String(
"qmlclass") || elementName == QLatin1String(
"qmlvaluetype")
308 || elementName == QLatin1String(
"qmlbasictype")))) {
311 QString logicalModuleName = attributes.value(QLatin1String(
"qml-module-name")).toString();
312 if (!logicalModuleName.isEmpty())
313 m_qdb->addToQmlModule(logicalModuleName, qmlTypeNode);
314 bool abstract =
false;
315 if (attributes.value(QLatin1String(
"abstract")) == QLatin1String(
"true"))
317 qmlTypeNode->setAbstract(abstract);
318 if (attributes.value(QLatin1String(
"singleton")) == QLatin1String(
"true"))
319 qmlTypeNode->setSingleton();
320 else if (attributes.value(QLatin1String(
"uncreatable")) == QLatin1String(
"true"))
321 qmlTypeNode->setUncreatable();
322 QString qmlFullBaseName = attributes.value(QLatin1String(
"qml-base-type")).toString();
323 if (!qmlFullBaseName.isEmpty()) {
324 qmlTypeNode->setQmlBaseName(qmlFullBaseName);
326 if (attributes.hasAttribute(QLatin1String(
"location")))
327 name = attributes.value(
"location").toString();
328 if (!indexUrl.isEmpty())
329 location
= Location(indexUrl + QLatin1Char(
'/') + name);
330 else if (!indexUrl.isNull())
333 }
else if (parent && elementName == QLatin1String(
"qmlproperty")) {
335 QString propertyGroup = attributes.value(
"inpropertygroup").toString();
337 if (attributes.value(
"propertygroup") ==
"true") {
339 propertyGroup = attributes.value(
"fullname").toString();
341 QString type = attributes.value(QLatin1String(
"type")).toString();
342 bool attached =
false;
343 if (attributes.value(QLatin1String(
"attached")) == QLatin1String(
"true"))
345 bool readonly =
false;
346 if (attributes.value(QLatin1String(
"writable")) == QLatin1String(
"false"))
349 qmlPropertyNode->markReadOnly(readonly);
350 if (attributes.value(QLatin1String(
"required")) == QLatin1String(
"true"))
351 qmlPropertyNode->setRequired();
353 node = qmlPropertyNode;
356 if (!propertyGroup.isEmpty()) {
361 scn =
new SharedCommentNode(
static_cast<QmlTypeNode *>(parent), 0, propertyGroup.split(
".").last());
362 state.sharedDocNodes[propertyGroup] = scn;
369 hasReadChildren =
true;
372 }
else if (elementName == QLatin1String(
"group")) {
373 auto *collectionNode = m_qdb->addGroup(name);
374 collectionNode->setTitle(attributes.value(QLatin1String(
"title")).toString());
375 collectionNode->setSubtitle(attributes.value(QLatin1String(
"subtitle")).toString());
376 if (attributes.value(QLatin1String(
"seen")) == QLatin1String(
"true"))
377 collectionNode->markSeen();
378 node = collectionNode;
379 }
else if (elementName == QLatin1String(
"module")) {
380 auto *collectionNode = m_qdb->addModule(name);
381 collectionNode->setTitle(attributes.value(QLatin1String(
"title")).toString());
382 collectionNode->setSubtitle(attributes.value(QLatin1String(
"subtitle")).toString());
383 if (attributes.value(QLatin1String(
"seen")) == QLatin1String(
"true"))
384 collectionNode->markSeen();
385 node = collectionNode;
386 }
else if (elementName == QLatin1String(
"concept")) {
387 auto *collectionNode = m_qdb->addConcept(name);
388 collectionNode->setTitle(attributes.value(QLatin1String(
"title")).toString());
389 collectionNode->setSubtitle(attributes.value(QLatin1String(
"subtitle")).toString());
390 if (attributes.value(QLatin1String(
"seen")) == QLatin1String(
"true"))
391 collectionNode->markSeen();
392 node = collectionNode;
393 }
else if (elementName == QLatin1String(
"qmlmodule")) {
394 auto *collectionNode = m_qdb->addQmlModule(name);
395 const QStringList info = QStringList()
397 << QString(attributes.value(QLatin1String(
"qml-module-version")).toString());
398 collectionNode->setLogicalModuleInfo(info);
399 collectionNode->setTitle(attributes.value(QLatin1String(
"title")).toString());
400 collectionNode->setSubtitle(attributes.value(QLatin1String(
"subtitle")).toString());
401 if (attributes.value(QLatin1String(
"seen")) == QLatin1String(
"true"))
402 collectionNode->markSeen();
403 node = collectionNode;
404 }
else if (elementName == QLatin1String(
"page")) {
406 QString attr = attributes.value(QLatin1String(
"subtype")).toString();
407 if (attr == QLatin1String(
"attribution")) {
409 }
else if (attr == QLatin1String(
"example")) {
411 }
else if (attr == QLatin1String(
"file")) {
413 }
else if (attr == QLatin1String(
"image")) {
415 }
else if (attr == QLatin1String(
"page")) {
417 }
else if (attr == QLatin1String(
"externalpage")) {
423 auto *exampleNode =
static_cast<ExampleNode *>(current);
425 exampleNode->appendFile(name);
428 exampleNode->appendImage(name);
438 pageNode =
new PageNode(parent, name);
442 pageNode->setTitle(attributes.value(QLatin1String(
"title")).toString());
444 if (attributes.hasAttribute(QLatin1String(
"location")))
445 name = attributes.value(QLatin1String(
"location")).toString();
447 if (!indexUrl.isEmpty())
448 location
= Location(indexUrl + QLatin1Char(
'/') + name);
449 else if (!indexUrl.isNull())
454 }
else if (parent && (elementName == QLatin1String(
"enum") || elementName == QLatin1String(
"qmlenum"))) {
456 if (elementName == QLatin1String(
"enum"))
457 enumNode =
new EnumNode(parent, name, attributes.hasAttribute(
"scoped"));
461 if (!indexUrl.isEmpty())
462 location
= Location(indexUrl + QLatin1Char(
'/') + parent->name().toLower() +
".html");
463 else if (!indexUrl.isNull())
464 location
= Location(parent->name().toLower() +
".html");
466 if (attributes.value(
"anonymous") ==
"true")
469 while (reader.readNextStartElement()) {
470 QXmlStreamAttributes childAttributes = reader.attributes();
471 if (reader.name() == QLatin1String(
"value")) {
472 EnumItem item(childAttributes.value(QLatin1String(
"name")).toString(),
473 childAttributes.value(QLatin1String(
"value")).toString(),
474 childAttributes.value(QLatin1String(
"since")).toString()
477 }
else if (reader.name() == QLatin1String(
"keyword")) {
479 }
else if (reader.name() == QLatin1String(
"target")) {
482 reader.skipCurrentElement();
487 hasReadChildren =
true;
488 }
else if (parent && elementName == QLatin1String(
"typedef")) {
490 if (attributes.hasAttribute(
"aliasedtype"))
491 typedefNode =
new TypeAliasNode(parent, name, attributes.value(QLatin1String(
"aliasedtype")).toString());
496 if (attributes.hasAttribute(
"enum")) {
497 auto path = attributes.value(QLatin1String(
"enum")).toString();
498 const Node *enode = m_qdb->findNodeForTarget(path, typedefNode);
500 const EnumNode *n =
static_cast<
const EnumNode *>(enode);
506 if (!indexUrl.isEmpty())
507 location
= Location(indexUrl + QLatin1Char(
'/') + parent->name().toLower() +
".html");
508 else if (!indexUrl.isNull())
509 location
= Location(parent->name().toLower() +
".html");
510 }
else if (parent && elementName == QLatin1String(
"property")) {
513 if (attributes.value(QLatin1String(
"bindable")) == QLatin1String(
"true"))
516 propNode->setWritable(attributes.value(QLatin1String(
"writable")) != QLatin1String(
"false"));
517 propNode->setDataType(attributes.value(QLatin1String(
"dataType")).toString());
519 if (attributes.value(QLatin1String(
"constant")) == QLatin1String(
"true"))
520 propNode->setConstant();
522 if (!indexUrl.isEmpty())
523 location
= Location(indexUrl + QLatin1Char(
'/') + parent->name().toLower() +
".html");
524 else if (!indexUrl.isNull())
525 location
= Location(parent->name().toLower() +
".html");
527 }
else if (parent && elementName == QLatin1String(
"function")) {
528 QString t = attributes.value(QLatin1String(
"meta")).toString();
529 bool attached =
false;
532 metaness = FunctionNode::getMetaness(t);
533 if (attributes.value(QLatin1String(
"attached")) == QLatin1String(
"true"))
535 auto *fn =
new FunctionNode(metaness, parent, name, attached);
537 fn->setReturnType(attributes.value(QLatin1String(
"type")).toString());
539 const auto &declaredTypeAttr = attributes.value(QLatin1String(
"declaredtype"));
540 if (!declaredTypeAttr.isEmpty())
541 fn->setDeclaredReturnType(declaredTypeAttr.toString());
543 if (fn->isCppNode()) {
544 fn->setVirtualness(attributes.value(QLatin1String(
"virtual")).toString());
545 fn->setConst(attributes.value(QLatin1String(
"const")) == QLatin1String(
"true"));
546 fn->setStatic(attributes.value(QLatin1String(
"static")) == QLatin1String(
"true"));
547 fn->setFinal(attributes.value(QLatin1String(
"final")) == QLatin1String(
"true"));
548 fn->setOverride(attributes.value(QLatin1String(
"override")) == QLatin1String(
"true"));
550 if (attributes.value(QLatin1String(
"explicit")) == QLatin1String(
"true"))
553 if (attributes.value(QLatin1String(
"constexpr")) == QLatin1String(
"true"))
556 if (attributes.value(QLatin1String(
"explicitly-defaulted")) == QLatin1String(
"true"))
557 fn->markExplicitlyDefaulted();
559 if (attributes.value(QLatin1String(
"deleted")) == QLatin1String(
"true"))
560 fn->markDeletedAsWritten();
561 if (attributes.value(QLatin1String(
"hidden-friend")) == QLatin1String(
"true"))
562 fn->setHiddenFriend(
true);
564 if (attributes.value(QLatin1String(
"noexcept")) == QLatin1String(
"true")) {
565 fn->markNoexcept(attributes.value(
"noexcept_expression").toString());
568 if (attributes.hasAttribute(QLatin1String(
"trailing_requires")))
569 fn->setTrailingRequiresClause(attributes.value(QLatin1String(
"trailing_requires")).toString());
571 qsizetype refness = attributes.value(QLatin1String(
"refness")).toUInt();
574 else if (refness == 2)
577
578
579
580
581
582 if (attributes.value(QLatin1String(
"overload")) == QLatin1String(
"true"))
583 fn->setOverloadNumber(attributes.value(QLatin1String(
"overload-number")).toUInt());
585 fn->setOverloadNumber(0);
589
590
591
592
593
594
595 while (reader.readNextStartElement()) {
596 QXmlStreamAttributes childAttributes = reader.attributes();
597 if (reader.name() == QLatin1String(
"parameter")) {
598 QString type = childAttributes.value(QLatin1String(
"type")).toString();
599 QString name = childAttributes.value(QLatin1String(
"name")).toString();
600 QString default_ = childAttributes.value(QLatin1String(
"default")).toString();
601 fn->parameters().append(type, name, default_);
602 }
else if (reader.name() == QLatin1String(
"keyword")) {
604 }
else if (reader.name() == QLatin1String(
"target")) {
607 reader.skipCurrentElement();
611 if (!indexUrl.isEmpty())
612 location
= Location(indexUrl + QLatin1Char(
'/') + parent->name().toLower() +
".html");
613 else if (!indexUrl.isNull())
614 location
= Location(parent->name().toLower() +
".html");
616 hasReadChildren =
true;
617 }
else if (parent && elementName == QLatin1String(
"variable")) {
619 varNode->setLeftType(attributes.value(
"type").toString());
620 varNode->setStatic((attributes.value(
"static").toString() ==
"true") ?
true :
false);
622 if (!indexUrl.isEmpty())
623 location
= Location(indexUrl + QLatin1Char(
'/') + parent->name().toLower() +
".html");
624 else if (!indexUrl.isNull())
625 location
= Location(parent->name().toLower() +
".html");
626 }
else if (elementName == QLatin1String(
"keyword")) {
629 }
else if (elementName == QLatin1String(
"target")) {
632 }
else if (elementName == QLatin1String(
"contents")) {
635 }
else if (parent && elementName == QLatin1String(
"proxy")) {
637 if (!indexUrl.isEmpty())
638 location
= Location(indexUrl + QLatin1Char(
'/') + name.toLower() +
".html");
639 else if (!indexUrl.isNull())
640 location
= Location(name.toLower() +
".html");
648 auto *cn =
static_cast<CollectionNode *>(node);
649 if (attributes.hasAttribute(QLatin1String(
"cmakepackage")))
650 cn->setCMakePackage(attributes.value(QLatin1String(
"cmakepackage")).toString());
651 if (attributes.hasAttribute(QLatin1String(
"cmakecomponent")))
652 cn->setCMakeComponent(attributes.value(QLatin1String(
"cmakecomponent")).toString());
653 if (attributes.hasAttribute(QLatin1String(
"cmaketargetitem")))
654 cn->setCMakeTargetItem(attributes.value(QLatin1String(
"cmaketargetitem")).toString());
655 if (attributes.hasAttribute(QLatin1String(
"qtvariable")))
656 cn->setQtVariable(attributes.value(QLatin1String(
"qtvariable")).toString());
658 if (node
->isAggregate() && attributes.hasAttribute(QLatin1String(
"includefile"))) {
659 auto *agg =
static_cast<Aggregate *>(node);
660 agg->setIncludeFile(attributes.value(QLatin1String(
"includefile")).toString());
663 if (!href.isEmpty()) {
667 node->setUrl(indexUrl + QLatin1Char(
'/') + href);
670 const QString access = attributes.value(QLatin1String(
"access")).toString();
671 if (access ==
"protected")
673 else if (access ==
"private")
678 if (attributes.hasAttribute(QLatin1String(
"related"))) {
680 state.relatedNodes << node;
683 if (attributes.hasAttribute(QLatin1String(
"threadsafety"))) {
684 QString threadSafety = attributes.value(QLatin1String(
"threadsafety")).toString();
685 if (threadSafety == QLatin1String(
"non-reentrant"))
687 else if (threadSafety == QLatin1String(
"reentrant"))
689 else if (threadSafety == QLatin1String(
"thread safe"))
696 const QString category = attributes.value(QLatin1String(
"comparison_category")).toString();
699 QString status = attributes.value(QLatin1String(
"status")).toString();
701 if (status == QLatin1String(
"obsolete") || status == QLatin1String(
"deprecated"))
703 else if (status == QLatin1String(
"preliminary"))
705 else if (status == QLatin1String(
"internal"))
707 else if (status == QLatin1String(
"internal-auto"))
709 else if (status == QLatin1String(
"ignored"))
714 QString physicalModuleName = attributes.value(QLatin1String(
"module")).toString();
715 if (!physicalModuleName.isEmpty())
716 m_qdb->addToModule(physicalModuleName, node);
718 QString since = attributes.value(QLatin1String(
"since")).toString();
719 if (!since.isEmpty()) {
720 node->setSince(since);
723 if (attributes.hasAttribute(QLatin1String(
"documented"))) {
724 if (attributes.value(QLatin1String(
"documented")) == QLatin1String(
"true"))
728 QString groupsAttr = attributes.value(QLatin1String(
"groups")).toString();
729 if (!groupsAttr.isEmpty()) {
730 const QStringList groupNames = groupsAttr.split(QLatin1Char(
','));
731 for (
const auto &group : groupNames) {
732 m_qdb->addToGroup(group, node);
737 QSet<QString> emptySet;
739 if (!filePath.isEmpty()) {
744 Doc doc(location, location, QString(), emptySet, emptySet);
745 if (attributes.value(QLatin1String(
"auto-generated")) == QLatin1String(
"true"))
749 QString briefAttr = attributes.value(QLatin1String(
"brief")).toString();
750 if (!briefAttr.isEmpty()) {
751 node->setReconstitutedBrief(briefAttr);
754 if (
const auto sortKey = attributes.value(QLatin1String(
"sortkey")).toString(); !sortKey.isEmpty()) {
757 metaMap->insert(
"sortkey", sortKey);
759 if (!hasReadChildren) {
760 bool useParent = (elementName == QLatin1String(
"namespace") && name.isEmpty());
761 while (reader.readNextStartElement()) {
763 readIndexSection(reader, parent, indexUrl, state);
765 readIndexSection(reader, node, indexUrl, state);
771 while (!reader.isEndElement()) {
772 if (reader.readNext() == QXmlStreamReader::Invalid) {
779 const QXmlStreamAttributes &attributes,
Node *node)
796 QString name = attributes.value(QLatin1String(
"name")).toString();
797 QString title = attributes.value(QLatin1String(
"title")).toString();
798 m_qdb->insertTarget(name, title, type, node, priority);
802
803
804
805
806
807
808
809
810
811
812
813
814
817 for (
const auto &pair : std::as_const(state.bases)) {
818 const QStringList bases = pair.second.split(QLatin1Char(
','));
819 for (
const auto &base : bases) {
820 QStringList basePath = base.split(QString(
"::"));
821 Node *n = m_qdb->findClassNode(basePath);
823 pair.first->addResolvedBaseClass(Access::Public,
static_cast<ClassNode *>(n));
825 pair.first->addUnresolvedBaseClass(Access::Public, basePath);
835 return QLatin1String(
"public");
836 case Access::Protected:
837 return QLatin1String(
"protected");
838 case Access::Private:
839 return QLatin1String(
"private");
843 return QLatin1String(
"public");
850 return QLatin1String(
"deprecated");
852 return QLatin1String(
"preliminary");
854 return QLatin1String(
"active");
856 return QLatin1String(
"internal");
858 return QLatin1String(
"internal-auto");
860 return QLatin1String(
"ignored");
864 return QLatin1String(
"active");
871 return QLatin1String(
"non-reentrant");
873 return QLatin1String(
"reentrant");
875 return QLatin1String(
"thread safe");
880 return QLatin1String(
"unspecified");
884
885
886
887
890 qsizetype i = state.relatedNodes.indexOf(node);
892 i = state.relatedNodes.size();
893 state.relatedNodes << node;
899
900
901
902static void writeNonEmpty(QXmlStreamWriter &writer,
const QString &name,
const QString &value)
904 if (!value.isEmpty())
905 writer.writeAttribute(name, value);
909
910
911
912
915 Node *related = state.relatedNodes.value(index);
917 if (adoptiveParent && related) {
926
927
928
929
930
934 for (
const Atom *target : std::as_const(node->doc().targets())) {
935 const QString &title = target->string();
936 const QString name = target->count() >= 2 ? target->string(1)
937 : TextUtils::asAsciiPrintable(title);
938 writer.writeStartElement(
"target");
939 writer.writeAttribute(
"name", node->isExternalPage() ? title : name);
941 writer.writeAttribute(
"title", title);
942 writer.writeEndElement();
946 for (
const Atom *keyword : std::as_const(node->doc().keywords())) {
947 const QString &title = keyword->string();
948 const QString &name{TextUtils::asAsciiPrintable(title)};
949 writer.writeStartElement(
"keyword");
950 writer.writeAttribute(
"name", name);
952 writer.writeAttribute(
"title", title);
953 writer.writeEndElement();
959
960
961
962
963
964
965
966
967
968
969
974 Q_ASSERT(context.documentLocation);
976
977
982 QString logicalModuleName;
983 QString logicalModuleVersion;
984 QString qmlFullBaseName;
985 QString baseNameAttr;
986 QString moduleNameAttr;
987 QString moduleVerAttr;
991 nodeName =
"namespace";
1003 nodeName =
"header";
1006 nodeName =
"qmlenum";
1011 logicalModuleName = node->logicalModuleName();
1012 baseNameAttr =
"qml-base-type";
1013 moduleNameAttr =
"qml-module-name";
1014 moduleVerAttr =
"qml-module-version";
1015 qmlFullBaseName = node->qmlFullBaseName();
1026 nodeName =
"module";
1029 nodeName =
"concept";
1032 nodeName =
"qmlmodule";
1033 moduleNameAttr =
"qml-module-name";
1034 moduleVerAttr =
"qml-module-version";
1035 logicalModuleName = node->logicalModuleName();
1036 logicalModuleVersion = node->logicalModuleVersion();
1043 nodeName =
"typedef";
1046 nodeName =
"property";
1049 nodeName =
"variable";
1055 nodeName =
"qmlproperty";
1058 nodeName =
"qmlproperty";
1068 QString objName = node->name();
1073 writer.writeStartElement(nodeName);
1077 writer.writeAttribute(
"threadsafety", getThreadSafenessString(node->threadSafeness()));
1080 writer.writeAttribute(
"name", objName);
1083 writer.writeAttribute(
"propertygroup",
"true");
1088 if (!moduleNameAttr.isEmpty()) {
1089 if (!logicalModuleName.isEmpty())
1090 writer.writeAttribute(moduleNameAttr, logicalModuleName);
1091 if (!logicalModuleVersion.isEmpty())
1092 writer.writeAttribute(moduleVerAttr, logicalModuleVersion);
1094 if (!baseNameAttr.isEmpty() && !qmlFullBaseName.isEmpty())
1095 writer.writeAttribute(baseNameAttr, qmlFullBaseName);
1096 else if (!baseNameAttr.isEmpty()) {
1097 const auto &qmlBase =
static_cast<QmlTypeNode *>(node)->qmlBaseName();
1098 writeNonEmpty(writer, baseNameAttr, qmlBase);
1103 QString fullName = node->fullDocumentName();
1104 if (fullName != objName)
1105 writer.writeAttribute(
"fullname", fullName);
1106 href = context.documentLocation(node);
1108 href = node->name();
1114 writeNonEmpty(writer,
"href", href);
1116 writer.writeAttribute(
"status", getStatusString(node->status()));
1118 writer.writeAttribute(
"access", getAccessString(node->access()));
1120 writer.writeAttribute(
"abstract",
"true");
1123 writeNonEmpty(writer,
"location", declLocation.fileName());
1125 writer.writeAttribute(
"filepath", declLocation.filePath());
1126 writer.writeAttribute(
"lineno", QString(
"%1").arg(declLocation
.lineNo()));
1130 writer.writeAttribute(
"related", QString::number(indexForNode(node, state)));
1132 writeNonEmpty(writer,
"since", node->since());
1135 writer.writeAttribute(
"documented",
"true");
1137 QStringList groups = m_qdb->groupNamesForNode(node);
1138 if (!groups.isEmpty())
1139 writer.writeAttribute(
"groups", groups.join(QLatin1Char(
',')));
1142 if (
const auto sortKey = metamap->value(
"sortkey"); !sortKey.isEmpty())
1143 writer.writeAttribute(
"sortkey", sortKey);
1147 auto *cn =
static_cast<CollectionNode *>(node);
1148 writeNonEmpty(writer,
"cmakepackage", cn->cmakePackage());
1149 writeNonEmpty(writer,
"cmakecomponent", cn->cmakeComponent());
1150 writeNonEmpty(writer,
"cmaketargetitem", cn->cmakeTargetItem());
1151 writeNonEmpty(writer,
"qtvariable", cn->qtVariable());
1155 auto *agg =
static_cast<Aggregate *>(node);
1156 if (agg->includeFile())
1157 writer.writeAttribute(
"includefile", *agg->includeFile());
1160 QString brief = node
->doc().trimmedBriefText(node->name()).toString();
1166 const auto *classNode =
static_cast<
const ClassNode *>(node);
1167 const QList<RelatedClass> &bases = classNode->baseClasses();
1168 QSet<QString> baseStrings;
1169 for (
const auto &related : bases) {
1170 ClassNode *n = related.m_node;
1172 baseStrings.insert(n->fullName());
1173 else if (!related.m_path.isEmpty())
1174 baseStrings.insert(related.m_path.join(QLatin1String(
"::")));
1176 if (!baseStrings.isEmpty()) {
1177 QStringList baseStringsAsList = baseStrings.values();
1178 baseStringsAsList.sort();
1179 writer.writeAttribute(
"bases", baseStringsAsList.join(QLatin1Char(
',')));
1181 writeNonEmpty(writer,
"module", node->physicalModuleName());
1182 writeNonEmpty(writer,
"brief", brief);
1187 const auto *headerNode =
static_cast<
const HeaderNode *>(node);
1188 writeNonEmpty(writer,
"module", headerNode->physicalModuleName());
1189 writeNonEmpty(writer,
"brief", brief);
1190 writer.writeAttribute(
"title", headerNode->title());
1191 writer.writeAttribute(
"fulltitle", headerNode->fullTitle());
1192 writer.writeAttribute(
"subtitle", headerNode->subtitle());
1195 const auto *namespaceNode =
static_cast<
const NamespaceNode *>(node);
1196 writeNonEmpty(writer,
"module", namespaceNode->physicalModuleName());
1197 writeNonEmpty(writer,
"brief", brief);
1198 writeNonEmpty(writer,
"whereDocumented", namespaceNode->whereDocumented());
1202 const auto *qmlTypeNode =
static_cast<
const QmlTypeNode *>(node);
1203 writeNonEmpty(writer,
"title", qmlTypeNode->title());
1204 writeNonEmpty(writer,
"fulltitle", qmlTypeNode->fullTitle());
1205 writeNonEmpty(writer,
"subtitle", qmlTypeNode->subtitle());
1206 if (qmlTypeNode->isSingleton())
1207 writer.writeAttribute(
"singleton",
"true");
1208 if (qmlTypeNode->isUncreatable())
1209 writer.writeAttribute(
"uncreatable",
"true");
1210 writeNonEmpty(writer,
"brief", brief);
1211 if (
ClassNode *cn = qmlTypeNode->classNode()) {
1212 writer.writeAttribute(
"class", cn->fullDocumentName());
1219 writer.writeAttribute(
"subtype",
"example");
1221 writer.writeAttribute(
"subtype",
"externalpage");
1223 writer.writeAttribute(
"subtype", (
static_cast<PageNode*>(node)->isAttribution() ?
"attribution" :
"page"));
1225 const auto *pageNode =
static_cast<
const PageNode *>(node);
1226 writeNonEmpty(writer,
"title", pageNode->title());
1227 writeNonEmpty(writer,
"fulltitle", pageNode->fullTitle());
1228 writeNonEmpty(writer,
"subtitle", pageNode->subtitle());
1229 writeNonEmpty(writer,
"brief", brief);
1235 const auto *collectionNode =
static_cast<
const CollectionNode *>(node);
1236 writer.writeAttribute(
"seen", collectionNode->wasSeen() ?
"true" :
"false");
1237 writeNonEmpty(writer,
"title", collectionNode->title());
1238 writeNonEmpty(writer,
"subtitle", collectionNode->subtitle());
1239 writeNonEmpty(writer,
"module", collectionNode->physicalModuleName());
1240 writeNonEmpty(writer,
"brief", brief);
1243 auto *qmlPropertyNode =
static_cast<QmlPropertyNode *>(node);
1244 writer.writeAttribute(
"type", qmlPropertyNode->dataType());
1245 writer.writeAttribute(
"attached", qmlPropertyNode->isAttached() ?
"true" :
"false");
1246 writer.writeAttribute(
"writable", qmlPropertyNode->isReadOnly() ?
"false" :
"true");
1247 if (qmlPropertyNode->isRequired())
1248 writer.writeAttribute(
"required",
"true");
1249 writeNonEmpty(writer,
"brief", brief);
1252 const auto *propertyNode =
static_cast<
const PropertyNode *>(node);
1255 writer.writeAttribute(
"bindable",
"true");
1257 if (!propertyNode->isWritable())
1258 writer.writeAttribute(
"writable",
"false");
1260 if (propertyNode->isConstant())
1261 writer.writeAttribute(
"constant",
"true");
1263 writer.writeAttribute(
"dataType", propertyNode->dataType());
1265 writeNonEmpty(writer,
"brief", brief);
1267 for (qsizetype i{0}; i < (qsizetype)PropertyNode::FunctionRole::NumFunctionRoles; ++i) {
1269 for (
const auto *fnNode : propertyNode->functions(role)) {
1270 writer.writeStartElement(PropertyNode::roleName(role));
1271 writer.writeAttribute(
"name", fnNode->name());
1272 writer.writeEndElement();
1277 const auto *variableNode =
static_cast<
const VariableNode *>(node);
1278 writer.writeAttribute(
"type", variableNode->dataType());
1279 writer.writeAttribute(
"static", variableNode->isStatic() ?
"true" :
"false");
1280 writeNonEmpty(writer,
"brief", brief);
1284 const auto *enumNode =
static_cast<
const EnumNode *>(node);
1285 if (enumNode->isScoped())
1286 writer.writeAttribute(
"scoped",
"true");
1287 if (enumNode->flagsType())
1288 writer.writeAttribute(
"typedef", enumNode->flagsType()->fullDocumentName());
1289 if (enumNode->isAnonymous())
1290 writer.writeAttribute(
"anonymous",
"true");
1291 const auto &items = enumNode->items();
1292 for (
const auto &item : items) {
1293 writer.writeStartElement(
"value");
1294 writer.writeAttribute(
"name", item.name());
1295 if (node->isEnumType(Genus::CPP))
1296 writer.writeAttribute(
"value", item.value());
1297 writeNonEmpty(writer,
"since", item.since());
1298 writer.writeEndElement();
1302 const auto *typedefNode =
static_cast<
const TypedefNode *>(node);
1303 if (typedefNode->associatedEnum())
1304 writer.writeAttribute(
"enum", typedefNode->associatedEnum()->fullDocumentName());
1307 writer.writeAttribute(
"aliasedtype",
static_cast<
const TypeAliasNode *>(node)->aliasedType());
1314 writeTargets(writer, node);
1317
1318
1319
1320
1321
1322
1325 for (
int i = 0; i < node
->doc().tableOfContents().size(); ++i) {
1327 int level = node
->doc().tableOfContentsLevels()[i];
1329 writer.writeStartElement(
"contents");
1330 writer.writeAttribute(
"name", Tree::refForAtom(item));
1331 writer.writeAttribute(
"title", title);
1332 writer.writeAttribute(
"level", QString::number(level));
1333 writer.writeEndElement();
1340 Q_ASSERT(context.exampleFileLocation);
1341 const auto *exampleNode =
static_cast<
const ExampleNode *>(node);
1342 const auto &files = exampleNode->files();
1343 const auto &images = exampleNode->images();
1344 for (
const QString &file : files) {
1345 writer.writeStartElement(
"page");
1346 writer.writeAttribute(
"name", file);
1347 writer.writeAttribute(
"href", context.exampleFileLocation(file));
1348 writer.writeAttribute(
"status",
"active");
1349 writer.writeAttribute(
"subtype",
"file");
1350 writer.writeAttribute(
"title",
"");
1351 writer.writeAttribute(
"fulltitle", Utilities::exampleFileTitle(file, Utilities::ExampleFileKind::File));
1352 writer.writeAttribute(
"subtitle", file);
1353 writer.writeEndElement();
1355 for (
const QString &file : images) {
1356 writer.writeStartElement(
"page");
1357 writer.writeAttribute(
"name", file);
1358 writer.writeAttribute(
"href", context.exampleFileLocation(file));
1359 writer.writeAttribute(
"status",
"active");
1360 writer.writeAttribute(
"subtype",
"image");
1361 writer.writeAttribute(
"title",
"");
1362 writer.writeAttribute(
"fulltitle", Utilities::exampleFileTitle(file, Utilities::ExampleFileKind::Image));
1363 writer.writeAttribute(
"subtitle", file);
1364 writer.writeEndElement();
1375
1376
1377
1378
1387 const QString objName = fn->name();
1388 writer.writeStartElement(
"function");
1389 writer.writeAttribute(
"name", objName);
1391 const QString fullName = fn->fullDocumentName();
1392 if (fullName != objName)
1393 writer.writeAttribute(
"fullname", fullName);
1394 const QString href = context.documentLocation(fn);
1395 writeNonEmpty(writer,
"href", href);
1397 writer.writeAttribute(
"threadsafety", getThreadSafenessString(fn->threadSafeness()));
1398 writer.writeAttribute(
"status", getStatusString(fn->status()));
1399 writer.writeAttribute(
"access", getAccessString(fn->access()));
1402 writeNonEmpty(writer,
"location", declLocation.fileName());
1404 writer.writeAttribute(
"filepath", declLocation.filePath());
1405 writer.writeAttribute(
"lineno", QString(
"%1").arg(declLocation
.lineNo()));
1409 writer.writeAttribute(
"documented",
"true");
1411 writer.writeAttribute(
"auto-generated",
"true");
1413 writer.writeAttribute(
"related", QString::number(indexForNode(fn, state)));
1414 writeNonEmpty(writer,
"since", fn->since());
1416 const QString brief = fn
->doc().trimmedBriefText(fn->name()).toString();
1417 writer.writeAttribute(
"meta", fn->metanessString());
1420 writer.writeAttribute(
"virtual", fn->virtualness());
1423 writer.writeAttribute(
"const",
"true");
1425 writer.writeAttribute(
"static",
"true");
1427 writer.writeAttribute(
"final",
"true");
1429 writer.writeAttribute(
"override",
"true");
1431 writer.writeAttribute(
"explicit",
"true");
1433 writer.writeAttribute(
"constexpr",
"true");
1435 writer.writeAttribute(
"explicitly-defaulted",
"true");
1437 writer.writeAttribute(
"deleted",
"true");
1439 writer.writeAttribute(
"hidden-friend",
"true");
1441 if (
auto noexcept_info = fn->getNoexcept()) {
1442 writer.writeAttribute(
"noexcept",
"true");
1443 writeNonEmpty(writer,
"noexcept_expression", *noexcept_info);
1446 if (
const auto &trailing_requires = fn->trailingRequiresClause(); trailing_requires && !trailing_requires->isEmpty())
1447 writer.writeAttribute(
"trailing_requires", *trailing_requires);
1450
1451
1452
1453
1454
1456 writer.writeAttribute(
"overload",
"true");
1457 writer.writeAttribute(
"overload-number", QString::number(fn->overloadNumber()));
1460 writer.writeAttribute(
"refness", QString::number(1));
1462 writer.writeAttribute(
"refness", QString::number(2));
1464 QStringList associatedProperties;
1465 for (
const auto *node : fn->associatedProperties()) {
1466 associatedProperties << node->name();
1468 associatedProperties.sort();
1469 writer.writeAttribute(
"associated-property",
1470 associatedProperties.join(QLatin1Char(
',')));
1474 writer.writeAttribute(
"attached",
"true");
1477 const auto &return_type = fn->returnType();
1478 if (!return_type.isEmpty())
1479 writer.writeAttribute(
"type",
std::move(return_type));
1481 const auto &declared_return_type = fn->declaredReturnType();
1482 if (declared_return_type.has_value())
1483 writer.writeAttribute(
"declaredtype", declared_return_type.value());
1486 writeNonEmpty(writer,
"brief", brief);
1489
1490
1491
1492
1493 const QString signature = appendAttributesToSignature(fn);
1494 writer.writeAttribute(
"signature", signature);
1496 QStringList groups = m_qdb->groupNamesForNode(fn);
1497 if (!groups.isEmpty())
1498 writer.writeAttribute(
"groups", groups.join(QLatin1Char(
',')));
1503 writer.writeStartElement(
"parameter");
1504 writer.writeAttribute(
"type", parameter.type());
1505 writer.writeAttribute(
"name", parameter.name());
1506 writer.writeAttribute(
"default", parameter.defaultValue());
1507 writer.writeEndElement();
1510 writeTargets(writer, fn);
1516 writer.writeEndElement();
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1535 signature +=
" final";
1537 signature +=
" override";
1539 signature +=
" = 0";
1540 if (
const auto &req = fn->trailingRequiresClause(); req && !req->isEmpty())
1541 signature +=
" requires " + *req;
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1565 for (
auto functions : std::as_const(aggregate->functionMap())) {
1566 std::for_each(functions.begin(), functions.end(),
1567 [
this, &writer, &context, &state, post](FunctionNode *fn) {
1568 generateFunctionSection(writer, fn, context, state, post);
1582
1583
1584
1585
1586
1587
1592 Q_ASSERT(context.documentLocation);
1595
1596
1597
1606 if (generateIndexSection(writer, node, context, state, post)) {
1608 auto *aggregate =
static_cast<Aggregate *>(node);
1610 generateFunctionSections(writer, aggregate, context, state, post);
1611 auto nonFunctionChildren = sortedNonFunctionChildren(aggregate);
1612 for (
auto *node : nonFunctionChildren)
1613 generateIndexSections(writer, node, context, state, post);
1616 if (node == state.root) {
1618
1619
1620
1621
1622
1623
1625 if (!groups.isEmpty()) {
1626 for (
auto it = groups.constBegin(); it != groups.constEnd(); ++it) {
1627 if (generateIndexSection(writer, it.value(), context, state, post))
1628 writer.writeEndElement();
1633 if (!modules.isEmpty()) {
1634 for (
auto it = modules.constBegin(); it != modules.constEnd(); ++it) {
1635 if (generateIndexSection(writer, it.value(), context, state, post))
1636 writer.writeEndElement();
1641 if (!qmlModules.isEmpty()) {
1642 for (
auto it = qmlModules.constBegin(); it != qmlModules.constEnd(); ++it) {
1643 if (generateIndexSection(writer, it.value(), context, state, post))
1644 writer.writeEndElement();
1649 if (!concepts.isEmpty()) {
1650 for (
auto it = concepts.constBegin(); it != concepts.constEnd(); ++it) {
1651 if (generateIndexSection(writer, it.value(), context, state, post))
1652 writer.writeEndElement();
1656 for (
auto *p : m_qdb->primaryTree()->proxies()) {
1657 if (generateIndexSection(writer, p, context, state, post)) {
1658 auto aggregate =
static_cast<Aggregate *>(p);
1659 generateFunctionSections(writer, aggregate, context, state, post);
1660 auto nonFunctionChildren = sortedNonFunctionChildren(aggregate);
1661 for (
auto *n : nonFunctionChildren)
1662 generateIndexSections(writer, n, context, state, post);
1663 writer.writeEndElement();
1668 writer.writeEndElement();
1673
1674
1675
1676
1677
1678
1679
1680void QDocIndexFiles::generateIndex(
const QString &fileName,
const QString &url,
1683 Q_ASSERT(context.documentLocation);
1685 QFile file(fileName);
1686 if (!file.open(QFile::WriteOnly | QFile::Text))
1689 qCDebug(lcQdoc) <<
"Writing index file:" << fileName;
1695 QXmlStreamWriter writer(&file);
1696 writer.setAutoFormatting(
true);
1697 writer.writeStartDocument();
1698 writer.writeDTD(
"<!DOCTYPE QDOCINDEX>");
1700 writer.writeStartElement(
"INDEX");
1701 writer.writeAttribute(
"url", url);
1702 writer.writeAttribute(
"title", title);
1703 writer.writeAttribute(
"version", m_qdb->version());
1704 writer.writeAttribute(
"project", context.project);
1706 writeNonEmpty(writer,
"indexTitle", state.root
->tree()->indexTitle());
1708 generateIndexSections(writer, state.root, context, state);
1710 writer.writeEndElement();
1711 writer.writeEndElement();
1712 writer.writeEndDocument();
NodeList nonFunctionChildren() const
Returns a copy of the child nodes of this aggregate that are not function nodes, in the order they ap...
void adoptChild(Node *child)
This Aggregate becomes the adoptive parent of child.
The Atom class is the fundamental unit for representing documents internally.
The ClassNode represents a C++ class.
bool hasTableOfContents() const
void markAutoGenerated()
Marks this documentation as auto-generated by QDoc.
QStringMultiMap * metaTagMap() const
void constructExtra() const
void setFlagsType(TypedefNode *typedefNode)
void addItem(const EnumItem &item)
Add item to the enum type's item list.
void setAnonymous(bool anonymous)
The ExternalPageNode represents an external documentation page.
This node is used to represent any kind of function being documented.
signed short overloadNumber() const
Returns the overload number for this function.
bool isPureVirtual() const override
bool isNonvirtual() const
bool isHiddenFriend() const
bool isAttached() const override
Returns true if the QML property or QML method node is marked as attached.
bool isDeletedAsWritten() const
bool isStatic() const override
Returns true if the FunctionNode represents a static function.
bool isExplicitlyDefaulted() const
Parameters & parameters()
bool hasAssociatedProperties() const
static bool isPubliclyVisible(const InclusionPolicy &policy, const NodeContext &context)
virtual void append(QXmlStreamWriter &writer, Node *node)=0
The Location class provides a way to mark a location in a file.
int lineNo() const
Returns the current line number.
Location & operator=(const Location &other)
The assignment operator does a deep copy of the entire state of other into this Location.
This class represents a C++ namespace.
Tree * tree() const override
Returns a pointer to the Tree that contains this NamespaceNode.
A PageNode is a Node that generates a documentation page.
The Parameter class describes one function parameter.
This class describes one instance of using the Q_PROPERTY macro.
A class for representing an Aggregate that is documented in a different module.
This class provides exclusive access to the qdoc database, which consists of a forrest of trees and a...
static QDocDatabase * qdocDB()
Creates the singleton.
const CNMap & qmlModules()
Returns a const reference to the collection of all QML module nodes in the primary tree.
NamespaceNode * primaryTreeRoot()
Returns a pointer to the root node of the primary tree.
const CNMap & modules()
Returns a const reference to the collection of all module nodes in the primary tree.
const CNMap & groups()
Returns a const reference to the collection of all group nodes in the primary tree.
This class imports QDoc index files and serializes index sections for module indexes and WebXML outpu...
Status
Specifies the status of the QQmlIncubator.
static Text sectionHeading(const Atom *sectionBegin)
static std::string comparisonCategoryAsString(ComparisonCategory category)
Metaness
Specifies the kind of function a FunctionNode represents.
Combined button and popup list for selecting options.
QMap< QString, CollectionNode * > CNMap
static QString getAccessString(Access t)
static NodeList sortedNonFunctionChildren(const Aggregate *aggregate)
static QString getThreadSafenessString(Node::ThreadSafeness t)
static QString getStatusString(Status t)
static void writeNonEmpty(QXmlStreamWriter &writer, const QString &name, const QString &value)
Write an attribute to the current element using the writer for the attribute with the given name if t...
ExampleEntries exampleEntries
The Node class is the base class for all the nodes in QDoc's parse tree.
bool isExternalPage() const
Returns true if the node type is ExternalPage.
const Doc & doc() const
Returns a reference to the node's Doc data member.
bool isQmlNode() const
Returns true if this node's Genus value is QML.
bool isGroup() const
Returns true if the node type is Group.
void setAccess(Access t)
Sets the node's access type to t.
void setIndexNodeFlag(bool isIndexNode=true)
Sets a flag in this Node that indicates the node was created for something in an index file.
virtual bool isAbstract() const
Returns true if the ClassNode or QmlTypeNode is marked abstract.
SharedCommentNode * sharedCommentNode()
ComparisonCategory comparisonCategory() const
bool isQmlType() const
Returns true if the node type is QmlType or QmlValueType.
bool isHeader() const
Returns true if the node type is HeaderFile.
NodeType nodeType() const override
Returns this node's type.
Genus genus() const override
Returns this node's Genus.
virtual bool isPageNode() const
Returns true if this node represents something that generates a documentation page.
bool isEnumType() const
Returns true if the node type is Enum.
virtual bool isTextPageNode() const
Returns true if the node is a PageNode but not an Aggregate.
Aggregate * parent() const
Returns the node's parent pointer, that is, the aggregate under which the node is documented.
void setLocation(const Location &t)
Sets the node's declaration location, its definition location, or both, depending on the suffix of th...
virtual bool isAggregate() const
Returns true if this node is an aggregate, which means it inherits Aggregate and can therefore have c...
virtual void setRelatedNonmember(bool b)
Sets a flag in the node indicating whether this node is a related nonmember of something.
void setComparisonCategory(const ComparisonCategory &category)
bool isProxyNode() const
Returns true if the node type is Proxy.
ThreadSafeness threadSafeness() const
Returns the thread safeness value for whatever this node represents.
virtual Tree * tree() const
Returns a pointer to the Tree this node is in.
const Location & declLocation() const
Returns the Location where this node's declaration was seen.
NodeContext createContext() const
void setDoc(const Doc &doc, bool replace=false)
Sets this Node's Doc to doc.
bool isModule() const
Returns true if the node type is Module.
virtual bool isPropertyGroup() const
Returns true if the node is a SharedCommentNode for documenting multiple C++ properties or multiple Q...
ThreadSafeness
An unsigned char that specifies the degree of thread-safeness of the element.
bool isSharingComment() const
This function returns true if the node is sharing a comment with other nodes.
virtual void setAbstract(bool)
If this node is a ClassNode or a QmlTypeNode, the node's abstract flag data member is set to b.
bool hasDoc() const
Returns true if this node is documented, or it represents a documented node read from the index ('had...
bool isRelatedNonmember() const
Returns true if this is a related nonmember of something.
virtual bool isClassNode() const
Returns true if this is an instance of ClassNode.
bool isCppNode() const
Returns true if this node's Genus value is CPP.
virtual void setStatus(Status t)
Sets the node's status to t.
virtual bool isCollectionNode() const
Returns true if this is an instance of CollectionNode.
void setThreadSafeness(ThreadSafeness t)
Sets the node's thread safeness to t.
bool isQmlModule() const
Returns true if the node type is QmlModule.
bool isExample() const
Returns true if the node type is Example.
bool isIndexNode() const
Returns true if this node was created from something in an index file.
static bool nodeLessThan(const Node *first, const Node *second)
Returns true if the node n1 is less than node n2.
const Parameter & at(int i) const
A record of a linkable target within the documentation.
TargetType
A type of a linkable target record.