summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2022-09-06 13:50:35 +0200
committerLuca Di Sera <luca.disera@qt.io>2022-09-07 12:32:23 +0200
commita285decaf612f75229d8429891be1beef165994b (patch)
treed0cb5d9fffa4981ffcce112b52709039217fec7f
parent157cb7cbcb5a8d148b25e43066b80edd71a1d1b9 (diff)
QDoc: Remove unfinished support for documenting javascript
The codebase for QDoc has support for commands related to documenting pure javascript codebases. Generally, given a certain QML specific command, a javascript equivalent is provided. For example, "\jstype" or "\jsmodule". Codewise, the support is bolted on by reusing the exact same code that is used for QML types. The internal structures used to represent QML elements, like `QmlPropertyNode`, were reused for javascript elements, with the sole difference of changing the metaness value, for elements where the metaness is meaningful, and the internal type tag of the node. Code that branched specifically with QML types was modified to branch for javascript types too, with mostly no other difference in the branched code itself. The support for javascript was never finalized, albeit it is supposed to work, lacking, for example, representation in the documentation. As a consequence of this it is not currently used, tested or necessary. Hence, the code supporting the documentation of javascript elements is now removed as dead code. Anything referring to javascript specific elements were removed, from the commands definitions to the categorization functions. "Node::changeType" and "FunctionNode::changeMetaness", that switched the type and metaness, respectively, of an existing node with a new one, albeit implemented in a more general fashion, are now removed as dead code, since they were used specifically to "convert" Qml nodes to "javascript nodes". References to javascript were removed in the documentation for QDoc. Do note that not all javascript related features were removed from the codebase. In particular, the "js" and "endjs" commands, to mark a codeblock as being javascript code, and their supporting code such as `JsCodeMarker`, were currently retained as, albeit no documentation exists, are currently used a couple of time in the current Qt's codebase. The remaining javascript specific code is expected to be addressed and removed in a future commit, unless the current usages are specific enough that they cannot be replaced with qml specific commands. Task-number: QTBUG-106275 Change-Id: I6a199ce97b26d6a3a645c0022e599a8654989a85 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/qdoc/aggregate.cpp40
-rw-r--r--src/qdoc/codemarker.cpp5
-rw-r--r--src/qdoc/codeparser.cpp2
-rw-r--r--src/qdoc/codeparser.h11
-rw-r--r--src/qdoc/cppcodemarker.cpp9
-rw-r--r--src/qdoc/cppcodeparser.cpp75
-rw-r--r--src/qdoc/cppcodeparser.h2
-rw-r--r--src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc2
-rw-r--r--src/qdoc/doc/qdoc-guide/qtwritingstyle-qml.qdoc4
-rw-r--r--src/qdoc/doc/qdoc-manual-markupcmds.qdoc7
-rw-r--r--src/qdoc/doc/qdoc-manual-qdocconf.qdoc18
-rw-r--r--src/qdoc/doc/qdoc-warnings.qdoc11
-rw-r--r--src/qdoc/docbookgenerator.cpp83
-rw-r--r--src/qdoc/docparser.cpp4
-rw-r--r--src/qdoc/functionnode.cpp72
-rw-r--r--src/qdoc/functionnode.h8
-rw-r--r--src/qdoc/generator.cpp65
-rw-r--r--src/qdoc/helpprojectwriter.cpp35
-rw-r--r--src/qdoc/htmlgenerator.cpp45
-rw-r--r--src/qdoc/node.cpp114
-rw-r--r--src/qdoc/node.h10
-rw-r--r--src/qdoc/qdocdatabase.cpp48
-rw-r--r--src/qdoc/qdocdatabase.h6
-rw-r--r--src/qdoc/qdocindexfiles.cpp100
-rw-r--r--src/qdoc/qmlcodemarker.cpp2
-rw-r--r--src/qdoc/qmlcodeparser.cpp6
-rw-r--r--src/qdoc/qmlpropertynode.cpp4
-rw-r--r--src/qdoc/qmltypenode.cpp20
-rw-r--r--src/qdoc/qmltypenode.h4
-rw-r--r--src/qdoc/qmlvisitor.cpp34
-rw-r--r--src/qdoc/sections.cpp30
-rw-r--r--src/qdoc/sharedcommentnode.h3
-rw-r--r--src/qdoc/tagfilewriter.cpp1
-rw-r--r--src/qdoc/tree.cpp65
-rw-r--r--src/qdoc/tree.h8
-rw-r--r--src/qdoc/xmlgenerator.cpp14
36 files changed, 207 insertions, 760 deletions
diff --git a/src/qdoc/aggregate.cpp b/src/qdoc/aggregate.cpp
index 850b9203a..6f68e9ea6 100644
--- a/src/qdoc/aggregate.cpp
+++ b/src/qdoc/aggregate.cpp
@@ -80,8 +80,7 @@ Node *Aggregate::findChildNode(const QString &name, Node::Genus genus, int findF
if (genus & node->genus()) {
if (findFlags & TypesOnly) {
if (!node->isTypedef() && !node->isClassNode() && !node->isQmlType()
- && !node->isQmlBasicType() && !node->isJsType()
- && !node->isJsBasicType() && !node->isEnumType())
+ && !node->isQmlBasicType() && !node->isEnumType())
continue;
} else if (findFlags & IgnoreModules && node->isModule())
continue;
@@ -518,14 +517,12 @@ void Aggregate::setOutputSubdirectory(const QString &t)
}
/*!
- If this node has a child that is a QML property or JS property
- named \a n, return a pointer to that child. Otherwise, return \nullptr.
+ If this node has a child that is a QML property named \a n, return a
+ pointer to that child. Otherwise, return \nullptr.
*/
QmlPropertyNode *Aggregate::hasQmlProperty(const QString &n) const
{
NodeType goal = Node::QmlProperty;
- if (isJsNode())
- goal = Node::JsProperty;
for (auto *child : qAsConst(m_children)) {
if (child->nodeType() == goal) {
if (child->name() == n)
@@ -536,15 +533,12 @@ QmlPropertyNode *Aggregate::hasQmlProperty(const QString &n) const
}
/*!
- If this node has a child that is a QML property or JS property
- named \a n and that also matches \a attached, return a pointer
- to that child.
+ If this node has a child that is a QML property named \a n and that
+ also matches \a attached, return a pointer to that child.
*/
QmlPropertyNode *Aggregate::hasQmlProperty(const QString &n, bool attached) const
{
NodeType goal = Node::QmlProperty;
- if (isJsNode())
- goal = Node::JsProperty;
for (auto *child : qAsConst(m_children)) {
if (child->nodeType() == goal) {
if (child->name() == n && child->isAttached() == attached)
@@ -652,8 +646,7 @@ bool Aggregate::hasObsoleteMembers() const
for (const auto *node : m_children)
if (!node->isPrivate() && node->isDeprecated()) {
if (node->isFunction() || node->isProperty() || node->isEnumType() || node->isTypedef()
- || node->isTypeAlias() || node->isVariable() || node->isQmlProperty()
- || node->isJsProperty())
+ || node->isTypeAlias() || node->isVariable() || node->isQmlProperty())
return true;
}
return false;
@@ -673,13 +666,13 @@ void Aggregate::findAllObsoleteThings()
if (node->isDeprecated()) {
if (node->isClassNode())
QDocDatabase::obsoleteClasses().insert(node->qualifyCppName(), node);
- else if (node->isQmlType() || node->isJsType())
+ else if (node->isQmlType())
QDocDatabase::obsoleteQmlTypes().insert(node->qualifyQmlName(), node);
} else if (node->isClassNode()) {
auto *a = static_cast<Aggregate *>(node);
if (a->hasObsoleteMembers())
QDocDatabase::classesWithObsoleteMembers().insert(node->qualifyCppName(), node);
- } else if (node->isQmlType() || node->isJsType()) {
+ } else if (node->isQmlType()) {
auto *a = static_cast<Aggregate *>(node);
if (a->hasObsoleteMembers())
QDocDatabase::qmlTypesWithObsoleteMembers().insert(node->qualifyQmlName(),
@@ -692,9 +685,9 @@ void Aggregate::findAllObsoleteThings()
}
/*!
- Finds all the C++ classes, QML types, JS types, QML and JS
- basic types, and examples in this aggregate and inserts them
- into appropriate maps for later use in generating documentation.
+ Finds all the C++ classes, QML types, QML basic types, and examples
+ in this aggregate and inserts them into appropriate maps for later
+ use in generating documentation.
*/
void Aggregate::findAllClasses()
{
@@ -703,12 +696,11 @@ void Aggregate::findAllClasses()
&& node->tree()->camelCaseModuleName() != QString("QDoc")) {
if (node->isClassNode()) {
QDocDatabase::cppClasses().insert(node->qualifyCppName().toLower(), node);
- } else if (node->isQmlType() || node->isQmlBasicType() || node->isJsType()
- || node->isJsBasicType()) {
+ } else if (node->isQmlType() || node->isQmlBasicType()) {
QString name = node->name().toLower();
QDocDatabase::qmlTypes().insert(name, node);
// also add to the QML basic type map
- if (node->isQmlBasicType() || node->isJsBasicType())
+ if (node->isQmlBasicType())
QDocDatabase::qmlBasicTypes().insert(name, node);
} else if (node->isExample()) {
// use the module index title as key for the example map
@@ -776,12 +768,12 @@ void Aggregate::findAllSince()
QString name = node->qualifyWithParentName();
nsmap.value().insert(name, node);
ncmap.value().insert(name, node);
- } else if (node->isQmlType() || node->isJsType()) {
+ } else if (node->isQmlType()) {
// Insert QML elements into the since and element maps.
QString name = node->qualifyWithParentName();
nsmap.value().insert(name, node);
nqcmap.value().insert(name, node);
- } else if (node->isQmlProperty() || node->isJsProperty()) {
+ } else if (node->isQmlProperty()) {
// Insert QML properties into the since map.
nsmap.value().insert(node->name(), node);
} else {
@@ -804,7 +796,7 @@ void Aggregate::resolveQmlInheritance()
{
NodeMap previousSearches;
for (auto *child : qAsConst(m_children)) {
- if (!child->isQmlType() && !child->isJsType())
+ if (!child->isQmlType())
continue;
static_cast<QmlTypeNode *>(child)->resolveInheritance(previousSearches);
}
diff --git a/src/qdoc/codemarker.cpp b/src/qdoc/codemarker.cpp
index 48e384f9d..757fb98a2 100644
--- a/src/qdoc/codemarker.cpp
+++ b/src/qdoc/codemarker.cpp
@@ -358,15 +358,12 @@ QString CodeMarker::taggedQmlNode(const Node *node)
if (node->isFunction()) {
const auto *fn = static_cast<const FunctionNode *>(node);
switch (fn->metaness()) {
- case FunctionNode::JsSignal:
case FunctionNode::QmlSignal:
tag = QLatin1String("@signal");
break;
- case FunctionNode::JsSignalHandler:
case FunctionNode::QmlSignalHandler:
tag = QLatin1String("@signalhandler");
break;
- case FunctionNode::JsMethod:
case FunctionNode::QmlMethod:
tag = QLatin1String("@method");
break;
@@ -374,7 +371,7 @@ QString CodeMarker::taggedQmlNode(const Node *node)
tag = QLatin1String("@unknown");
break;
}
- } else if (node->isQmlProperty() || node->isJsProperty()) {
+ } else if (node->isQmlProperty()) {
tag = QLatin1String("@property");
} else {
tag = QLatin1String("@unknown");
diff --git a/src/qdoc/codeparser.cpp b/src/qdoc/codeparser.cpp
index b58f89a5c..a56bf10c6 100644
--- a/src/qdoc/codeparser.cpp
+++ b/src/qdoc/codeparser.cpp
@@ -126,7 +126,7 @@ const QSet<QString> &CodeParser::commonMetaCommands()
{
if (commonMetaCommands_.isEmpty()) {
commonMetaCommands_ << COMMAND_ABSTRACT << COMMAND_DEFAULT << COMMAND_DEPRECATED << COMMAND_INGROUP
- << COMMAND_INJSMODULE << COMMAND_INMODULE << COMMAND_INPUBLICGROUP
+ << COMMAND_INMODULE << COMMAND_INPUBLICGROUP
<< COMMAND_INQMLMODULE << COMMAND_INTERNAL << COMMAND_MODULESTATE
<< COMMAND_NOAUTOLIST << COMMAND_NONREENTRANT << COMMAND_OBSOLETE
<< COMMAND_PRELIMINARY << COMMAND_QMLABSTRACT << COMMAND_QMLDEFAULT
diff --git a/src/qdoc/codeparser.h b/src/qdoc/codeparser.h
index 10b898ae3..99e1d2bfa 100644
--- a/src/qdoc/codeparser.h
+++ b/src/qdoc/codeparser.h
@@ -72,21 +72,10 @@ private:
#define COMMAND_HEADERFILE Doc::alias(QLatin1String("headerfile"))
#define COMMAND_INGROUP Doc::alias(QLatin1String("ingroup"))
#define COMMAND_INHEADERFILE Doc::alias(QLatin1String("inheaderfile"))
-#define COMMAND_INJSMODULE Doc::alias(QLatin1String("injsmodule"))
#define COMMAND_INMODULE Doc::alias(QLatin1String("inmodule")) // ### don't document
#define COMMAND_INPUBLICGROUP Doc::alias(QLatin1String("inpublicgroup"))
#define COMMAND_INQMLMODULE Doc::alias(QLatin1String("inqmlmodule"))
#define COMMAND_INTERNAL Doc::alias(QLatin1String("internal"))
-#define COMMAND_JSATTACHEDMETHOD Doc::alias(QLatin1String("jsattachedmethod"))
-#define COMMAND_JSATTACHEDPROPERTY Doc::alias(QLatin1String("jsattachedproperty"))
-#define COMMAND_JSATTACHEDSIGNAL Doc::alias(QLatin1String("jsattachedsignal"))
-#define COMMAND_JSBASICTYPE Doc::alias(QLatin1String("jsbasictype"))
-#define COMMAND_JSMETHOD Doc::alias(QLatin1String("jsmethod"))
-#define COMMAND_JSMODULE Doc::alias(QLatin1String("jsmodule"))
-#define COMMAND_JSPROPERTY Doc::alias(QLatin1String("jsproperty"))
-#define COMMAND_JSPROPERTYGROUP Doc::alias(QLatin1String("jspropertygroup"))
-#define COMMAND_JSSIGNAL Doc::alias(QLatin1String("jssignal"))
-#define COMMAND_JSTYPE Doc::alias(QLatin1String("jstype"))
#define COMMAND_MACRO Doc::alias(QLatin1String("macro"))
#define COMMAND_MODULE Doc::alias(QLatin1String("module"))
#define COMMAND_MODULESTATE Doc::alias(QLatin1String("modulestate"))
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp
index 9a9bf2284..3ba925018 100644
--- a/src/qdoc/cppcodemarker.cpp
+++ b/src/qdoc/cppcodemarker.cpp
@@ -78,8 +78,7 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, const Node * /* relati
if (style == Section::Details) {
if (!node->isRelatedNonmember() && !node->isProxyNode() && !node->parent()->name().isEmpty()
- && !node->parent()->isHeader() && !node->isProperty() && !node->isQmlNode()
- && !node->isJsNode()) {
+ && !node->parent()->isHeader() && !node->isProperty() && !node->isQmlNode()) {
name.prepend(taggedNode(node->parent()) + "::");
}
}
@@ -232,17 +231,17 @@ QString CppCodeMarker::markedUpQmlItem(const Node *node, bool summary)
QString name = taggedQmlNode(node);
if (summary) {
name = linkTag(node, name);
- } else if (node->isQmlProperty() || node->isJsProperty()) {
+ } else if (node->isQmlProperty()) {
const auto *pn = static_cast<const QmlPropertyNode *>(node);
if (pn->isAttached())
name.prepend(pn->element() + QLatin1Char('.'));
}
name = "<@name>" + name + "</@name>";
QString synopsis;
- if (node->isQmlProperty() || node->isJsProperty()) {
+ if (node->isQmlProperty()) {
const auto *pn = static_cast<const QmlPropertyNode *>(node);
synopsis = name + " : " + typified(pn->dataType());
- } else if (node->isFunction(Node::QML) || node->isFunction(Node::JS)) {
+ } else if (node->isFunction(Node::QML)) {
const auto *func = static_cast<const FunctionNode *>(node);
if (!func->returnType().isEmpty())
synopsis = typified(func->returnType(), true) + name;
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp
index 196efd527..8a2ed65eb 100644
--- a/src/qdoc/cppcodeparser.cpp
+++ b/src/qdoc/cppcodeparser.cpp
@@ -51,11 +51,7 @@ CppCodeParser::CppCodeParser()
<< COMMAND_QMLATTACHEDSIGNAL << COMMAND_QMLMETHOD
<< COMMAND_QMLATTACHEDMETHOD << COMMAND_QMLVALUETYPE << COMMAND_QMLBASICTYPE
<< COMMAND_QMLMODULE
- << COMMAND_JSTYPE << COMMAND_JSPROPERTY
- << COMMAND_JSPROPERTYGROUP // mws 13/03/2019
- << COMMAND_JSATTACHEDPROPERTY << COMMAND_JSSIGNAL << COMMAND_JSATTACHEDSIGNAL
- << COMMAND_JSMETHOD << COMMAND_JSATTACHEDMETHOD << COMMAND_JSBASICTYPE
- << COMMAND_JSMODULE << COMMAND_STRUCT << COMMAND_UNION;
+ << COMMAND_STRUCT << COMMAND_UNION;
}
if (metaCommands_.isEmpty()) {
metaCommands_ = commonMetaCommands();
@@ -263,13 +259,6 @@ Node *CppCodeParser::processTopicCommand(const Doc &doc, const QString &command,
cn->setLocation(doc.startLocation());
cn->markSeen();
return cn;
- } else if (command == COMMAND_JSMODULE) {
- QStringList blankSplit = arg.first.split(QLatin1Char(' '));
- CollectionNode *cn = m_qdb->addJsModule(blankSplit[0]);
- cn->setLogicalModuleInfo(blankSplit);
- cn->setLocation(doc.startLocation());
- cn->markSeen();
- return cn;
} else if (command == COMMAND_PAGE) {
Node::PageType ptype = Node::ArticlePage;
QStringList args = arg.first.split(QLatin1Char(' '));
@@ -302,27 +291,12 @@ Node *CppCodeParser::processTopicCommand(const Doc &doc, const QString &command,
qcn = new QmlTypeNode(m_qdb->primaryTreeRoot(), arg.first);
qcn->setLocation(doc.startLocation());
return qcn;
- } else if (command == COMMAND_JSTYPE) {
- QmlTypeNode *qcn = nullptr;
- Node *candidate = m_qdb->primaryTreeRoot()->findChildNode(arg.first, Node::JS);
- if (candidate != nullptr && candidate->isJsType())
- qcn = static_cast<QmlTypeNode *>(candidate);
- else
- qcn = new QmlTypeNode(m_qdb->primaryTreeRoot(), arg.first, Node::JsType);
- qcn->setLocation(doc.startLocation());
- return qcn;
} else if (command == COMMAND_QMLVALUETYPE || command == COMMAND_QMLBASICTYPE) {
auto *node = new QmlValueTypeNode(m_qdb->primaryTreeRoot(), arg.first);
node->setLocation(doc.startLocation());
return node;
- } else if (command == COMMAND_JSBASICTYPE) {
- auto *node = new QmlValueTypeNode(m_qdb->primaryTreeRoot(), arg.first, Node::JsBasicType);
- node->setLocation(doc.startLocation());
- return node;
} else if ((command == COMMAND_QMLSIGNAL) || (command == COMMAND_QMLMETHOD)
- || (command == COMMAND_QMLATTACHEDSIGNAL) || (command == COMMAND_QMLATTACHEDMETHOD)
- || (command == COMMAND_JSSIGNAL) || (command == COMMAND_JSMETHOD)
- || (command == COMMAND_JSATTACHEDSIGNAL) || (command == COMMAND_JSATTACHEDMETHOD)) {
+ || (command == COMMAND_QMLATTACHEDSIGNAL) || (command == COMMAND_QMLATTACHEDMETHOD)) {
Q_UNREACHABLE();
}
return nullptr;
@@ -391,7 +365,6 @@ void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocLis
QString qmlTypeName;
Topic topic = topics.at(0);
- bool jsProps = isJSPropertyTopic(topic.m_topic);
arg = topic.m_args;
if (splitQmlPropertyArg(arg, type, module, qmlTypeName, property, doc.location())) {
qsizetype i = property.indexOf('.');
@@ -407,8 +380,7 @@ void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocLis
for (const auto &topicCommand : topics) {
QString cmd = topicCommand.m_topic;
arg = topicCommand.m_args;
- if ((cmd == COMMAND_QMLPROPERTY) || (cmd == COMMAND_QMLATTACHEDPROPERTY)
- || (cmd == COMMAND_JSPROPERTY) || (cmd == COMMAND_JSATTACHEDPROPERTY)) {
+ if ((cmd == COMMAND_QMLPROPERTY) || (cmd == COMMAND_QMLATTACHEDPROPERTY)) {
bool attached = cmd.contains(QLatin1String("attached"));
if (splitQmlPropertyArg(arg, type, module, qmlTypeName, property, doc.location())) {
if (qmlType != m_qdb->findQmlType(module, qmlTypeName)) {
@@ -431,14 +403,14 @@ void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocLis
}
auto *qpn = new QmlPropertyNode(qmlType, property, type, attached);
qpn->setLocation(doc.startLocation());
- qpn->setGenus(jsProps ? Node::JS : Node::QML);
+ qpn->setGenus(Node::QML);
nodes.append(qpn);
docs.append(doc);
sharedNodes << qpn;
}
} else {
doc.startLocation().warning(
- QStringLiteral("Command '\\%1'; not allowed with QML/JS property commands")
+ QStringLiteral("Command '\\%1'; not allowed with QML property commands")
.arg(cmd));
}
}
@@ -578,12 +550,12 @@ void CppCodeParser::processMetaCommand(const Doc &doc, const QString &command,
} else if (command == COMMAND_QMLINHERITS) {
if (node->name() == arg)
doc.location().warning(QStringLiteral("%1 tries to inherit itself").arg(arg));
- else if (node->isQmlType() || node->isJsType()) {
+ else if (node->isQmlType()) {
auto *qmlType = static_cast<QmlTypeNode *>(node);
qmlType->setQmlBaseName(arg);
}
} else if (command == COMMAND_QMLINSTANTIATES) {
- if (node->isQmlType() || node->isJsType()) {
+ if (node->isQmlType()) {
ClassNode *classNode = m_qdb->findClassNode(arg.split("::"));
if (classNode)
node->setClassNode(classNode);
@@ -617,7 +589,7 @@ void CppCodeParser::processMetaCommand(const Doc &doc, const QString &command,
else
static_cast<QmlPropertyNode *>(node)->setRequired();
} else if ((command == COMMAND_QMLABSTRACT) || (command == COMMAND_ABSTRACT)) {
- if (node->isQmlType() || node->isJsType())
+ if (node->isQmlType())
node->setAbstract(true);
} else if (command == COMMAND_DEPRECATED) {
node->setStatus(Node::Deprecated);
@@ -630,8 +602,6 @@ void CppCodeParser::processMetaCommand(const Doc &doc, const QString &command,
m_qdb->addToModule(arg, node);
} else if (command == COMMAND_INQMLMODULE) {
m_qdb->addToQmlModule(arg, node);
- } else if (command == COMMAND_INJSMODULE) {
- m_qdb->addToJsModule(arg, node);
} else if (command == COMMAND_OBSOLETE) {
node->setStatus(Node::Deprecated);
} else if (command == COMMAND_NONREENTRANT) {
@@ -710,7 +680,7 @@ void CppCodeParser::processMetaCommands(const Doc &doc, Node *node)
}
/*!
- Parse QML/JS signal/method topic commands.
+ Parse QML signal/method topic commands.
*/
FunctionNode *CppCodeParser::parseOtherFuncArg(const QString &topic, const Location &location,
const QString &funcArg)
@@ -881,16 +851,6 @@ void CppCodeParser::setExampleFileLists(ExampleNode *en)
}
/*!
- returns true if \a t is \e {jssignal}, \e {jsmethod},
- \e {jsattachedsignal}, or \e {jsattachedmethod}.
- */
-bool CppCodeParser::isJSMethodTopic(const QString &t)
-{
- return (t == COMMAND_JSSIGNAL || t == COMMAND_JSMETHOD || t == COMMAND_JSATTACHEDSIGNAL
- || t == COMMAND_JSATTACHEDMETHOD);
-}
-
-/*!
returns true if \a t is \e {qmlsignal}, \e {qmlmethod},
\e {qmlattachedsignal}, or \e {qmlattachedmethod}.
*/
@@ -901,15 +861,6 @@ bool CppCodeParser::isQMLMethodTopic(const QString &t)
}
/*!
- Returns true if \a t is \e {jsproperty}, \e {jspropertygroup},
- or \e {jsattachedproperty}.
- */
-bool CppCodeParser::isJSPropertyTopic(const QString &t)
-{
- return (t == COMMAND_JSPROPERTY || t == COMMAND_JSATTACHEDPROPERTY);
-}
-
-/*!
Returns true if \a t is \e {qmlproperty}, \e {qmlpropertygroup},
or \e {qmlattachedproperty}.
*/
@@ -921,7 +872,7 @@ bool CppCodeParser::isQMLPropertyTopic(const QString &t)
void CppCodeParser::processTopicArgs(const Doc &doc, const QString &topic, NodeList &nodes,
DocList &docs)
{
- if (isQMLPropertyTopic(topic) || isJSPropertyTopic(topic)) {
+ if (isQMLPropertyTopic(topic)) {
processQmlProperties(doc, nodes, docs);
} else {
ArgList args = doc.metaCommandArgs(topic);
@@ -932,7 +883,7 @@ void CppCodeParser::processTopicArgs(const Doc &doc, const QString &topic, NodeL
node = parserForLanguage("Clang")->parseFnArg(doc.location(), args[0].first, args[0].second);
} else if (topic == COMMAND_MACRO) {
node = parseMacroArg(doc.location(), args[0].first);
- } else if (isQMLMethodTopic(topic) || isJSMethodTopic(topic)) {
+ } else if (isQMLMethodTopic(topic)) {
node = parseOtherFuncArg(topic, doc.location(), args[0].first);
} else if (topic == COMMAND_DONTDOCUMENT) {
m_qdb->primaryTree()->addToDontDocumentMap(args[0].first);
@@ -952,7 +903,7 @@ void CppCodeParser::processTopicArgs(const Doc &doc, const QString &topic, NodeL
node = parserForLanguage("Clang")->parseFnArg(doc.location(), arg.first, arg.second);
} else if (topic == COMMAND_MACRO) {
node = parseMacroArg(doc.location(), arg.first);
- } else if (isQMLMethodTopic(topic) || isJSMethodTopic(topic)) {
+ } else if (isQMLMethodTopic(topic)) {
node = parseOtherFuncArg(topic, doc.location(), arg.first);
} else {
node = processTopicCommand(doc, topic, arg);
@@ -1026,7 +977,7 @@ bool CppCodeParser::hasTooManyTopics(const Doc &doc) const
if (topicCommandsUsed.count() > 1) {
bool ok = true;
for (const auto &t : topicCommandsUsed) {
- if (!t.startsWith(QLatin1String("qml")) && !t.startsWith(QLatin1String("js")))
+ if (!t.startsWith(QLatin1String("qml")))
ok = false;
}
if (ok)
diff --git a/src/qdoc/cppcodeparser.h b/src/qdoc/cppcodeparser.h
index f0a2f6a60..b6d718eb9 100644
--- a/src/qdoc/cppcodeparser.h
+++ b/src/qdoc/cppcodeparser.h
@@ -35,9 +35,7 @@ public:
FunctionNode *parseMacroArg(const Location &location, const QString &macroArg);
FunctionNode *parseOtherFuncArg(const QString &topic, const Location &location,
const QString &funcArg);
- static bool isJSMethodTopic(const QString &t);
static bool isQMLMethodTopic(const QString &t);
- static bool isJSPropertyTopic(const QString &t);
static bool isQMLPropertyTopic(const QString &t);
protected:
diff --git a/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc b/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
index fa811dd0a..3c3075ba6 100644
--- a/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
+++ b/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
@@ -238,7 +238,7 @@
Documentation is contained within QDoc \e comments, delimited by
\beginqdoc and \endqdoc comments. Note that these are valid comments
- in C++, QML, and JavaScript.
+ in C++ and QML.
Within a QDoc comment, \c {//!} is used as a single-line documentation
comment; the comment itself and anything after it, until a newline,
diff --git a/src/qdoc/doc/qdoc-guide/qtwritingstyle-qml.qdoc b/src/qdoc/doc/qdoc-guide/qtwritingstyle-qml.qdoc
index d16cd26c0..cbf76b175 100644
--- a/src/qdoc/doc/qdoc-guide/qtwritingstyle-qml.qdoc
+++ b/src/qdoc/doc/qdoc-guide/qtwritingstyle-qml.qdoc
@@ -93,11 +93,11 @@ These are the possible documentation styles for signals:
\li "Emitted when..."
\endlist
-\section1 Methods and JavaScript Functions
+\section1 Methods and QML Functions
Typically, function documentation immediately precedes the implementation of the
function in the \c .cpp file. The \l{topic-commands}{topic command} for
-functions is \l{fn-command}{\\fn}. For functions in QML or JavaScript, the
+functions is \l{fn-command}{\\fn}. For functions in QML, the
documentation must reside immediately above the function declaration.
The function documentation starts with a verb, indicating the operation the
diff --git a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
index 360111802..ff516c5f8 100644
--- a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
@@ -3526,13 +3526,6 @@
\note Support for this argument was introduced in QDoc 5.6.
- \section2 \c jstypesbymodule
-
- Similar to \c classesbymodule argument, but used for listing the
- JavaScript types from the module specified with the second argument.
-
- \note Support for this argument was introduced in QDoc 5.6.
-
\section2 \c {examplefiles [regular_expression]}
The \c examplefiles argument lists the files that are part of
diff --git a/src/qdoc/doc/qdoc-manual-qdocconf.qdoc b/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
index b55c0f686..747bd8b35 100644
--- a/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
+++ b/src/qdoc/doc/qdoc-manual-qdocconf.qdoc
@@ -753,7 +753,7 @@
that QDoc will ignore when resolving hyperlink targets.
QDoc has an auto-linking feature, where linking is attempted for words
- that resemble C++, QML, or JavaScript entities. Specifically, a string
+ that resemble C++ or QML entities. Specifically, a string
qualifies for auto-linking if it is at least three characters in
length, has no whitespace, and it
@@ -1249,18 +1249,16 @@
documentation.
\badcode
- outputprefixes = QML JS
+ outputprefixes = QML
outputprefixes.QML = uicomponents-
- outputprefixes.JS = uicomponents-
\endcode
By default, files containing the API documentation for QML types
- are prefixed with "qml-", and javaScript types with "js-". In the
- above example, the prefix \c "uicomponents" is used instead for
- both.
+ are prefixed with "qml-". In the above example, the prefix \c
+ "uicomponents" is used instead.
The output prefix is applied to file names for documentation on
- QML and JS types.
+ QML.
\target outputsuffixes-variable
\section1 outputsuffixes
@@ -1278,9 +1276,9 @@
the generated HTML page for a QML type \e FooWidget would be
\c qml-foobar-tp-foowidget.html.
- By default, no suffix is used. The output suffix, if defined, is applied
- to file names for documentation on QML and JS types, and their respective
- module pages.
+ By default, no suffix is used. The output suffix, if defined, is
+ applied to file names for documentation on QML and its module
+ page.
The \c outputsuffixes variable was introduced in QDoc 5.6.
diff --git a/src/qdoc/doc/qdoc-warnings.qdoc b/src/qdoc/doc/qdoc-warnings.qdoc
index c3acb5100..bc68f39ab 100644
--- a/src/qdoc/doc/qdoc-warnings.qdoc
+++ b/src/qdoc/doc/qdoc-warnings.qdoc
@@ -235,7 +235,7 @@
the same QML property, either by appearing just before its definition,
or using the \l {qmlproperty-command}{\\qmlproperty} command.
- \section1 Command <command> not allowed with QML/JS property commands
+ \section1 Command <command> not allowed with QML property commands
Example:
@@ -250,11 +250,11 @@
Error message:
\badcode
- Command '\\qmlsignal' not allowed with QML/JS property commands
+ Command '\\qmlsignal' not allowed with QML property commands
\endcode
This warning is specific to property group documentation. QDoc
- allows multiple (qml|js)property or (qml|js)attachedproperty topic commands
+ allows multiple qmlproperty or qmlattachedproperty topic commands
in a single documentation comment to document a property group
where the last element in the path is <group>.<property>. Any other topic
commands triggers this warning.
@@ -538,7 +538,6 @@
\li \\generatelist classes <prefix>
\li \\generatelist classesbymodule <module name>
\li \\generatelist qmltypesbymodule <module name>
- \li \\generatelist jstypesbymodule <module_name>
\li \\generatelist examplesfiles <regular expression>
\li \\generatelist exampleimages <regular expression>
\li \\generatelist functionindex
@@ -624,10 +623,10 @@
the topic documented, so should end in a full stop. It should
also be brief.
- \section1 QtDeclarative not installed; cannot parse QML or JS
+ \section1 QtDeclarative not installed; cannot parse QML
QDoc issues this warning if it has been compiled without support
- for QML/JS parsing. This should not happen unless you have a
+ for QML parsing. This should not happen unless you have a
custom build of QDoc.
\section1 Invalid regular expression <regex>
diff --git a/src/qdoc/docbookgenerator.cpp b/src/qdoc/docbookgenerator.cpp
index bf5d2098a..744cbe62d 100644
--- a/src/qdoc/docbookgenerator.cpp
+++ b/src/qdoc/docbookgenerator.cpp
@@ -1187,8 +1187,6 @@ void DocBookGenerator::generateList(const Node *relative, const QString &selecto
type = Node::Module;
else if (selector == QLatin1String("qml-modules"))
type = Node::QmlModule;
- else if (selector == QLatin1String("js-modules"))
- type = Node::JsModule;
if (type != Node::NoType) {
NodeList nodeList;
@@ -1200,9 +1198,8 @@ void DocBookGenerator::generateList(const Node *relative, const QString &selecto
generateAnnotatedList(relative, nodeList, selector);
} else {
/*
- \generatelist {selector} is only allowed in a
- comment where the topic is \group, \module,
- \qmlmodule, or \jsmodule
+ \generatelist {selector} is only allowed in a comment where
+ the topic is \group, \module, or \qmlmodule.
*/
Node *n = const_cast<Node *>(relative);
auto *cn = static_cast<CollectionNode *>(n);
@@ -1412,7 +1409,7 @@ void DocBookGenerator::generateCompactList(ListType listType, const Node *relati
}
QStringList pieces;
- if (it.value()->isQmlType() || it.value()->isJsType()) {
+ if (it.value()->isQmlType()) {
QString name = it.value()->name();
next = it;
++next;
@@ -1867,7 +1864,7 @@ static QString nodeToSynopsisTag(const Node *node)
if (node->isTypedef())
return QStringLiteral("typedefsynopsis");
if (node->isFunction()) {
- // Signals are also encoded as functions (including QML/JS ones).
+ // Signals are also encoded as functions (including QML ones).
const auto fn = static_cast<const FunctionNode *>(node);
if (fn->isCtor() || fn->isCCtor() || fn->isMCtor())
return QStringLiteral("constructorsynopsis");
@@ -2843,8 +2840,7 @@ void DocBookGenerator::generateDocBookSynopsis(const Node *node)
// Nothing to export in some cases. Note that isSharedCommentNode() returns
// true also for QML property groups.
- if (node->isGroup() || node->isSharedCommentNode() || node->isModule() || node->isJsModule()
- || node->isQmlModule() || node->isPageNode())
+ if (node->isGroup() || node->isSharedCommentNode() || node->isModule() || node->isQmlModule() || node->isPageNode())
return;
// Cast the node to several subtypes (null pointer if the node is not of the required type).
@@ -3356,7 +3352,7 @@ void DocBookGenerator::typified(const QString &string, const Node *relative, boo
// Add the link, logic from HtmlGenerator::highlightedCode.
const Node *n = m_qdb->findTypeNode(pendingWord, relative, Node::DontCare);
QString href;
- if (!(n && (n->isQmlBasicType() || n->isJsBasicType()))
+ if (!(n && n->isQmlBasicType())
|| (relative
&& (relative->genus() == n->genus() || Node::DontCare == n->genus()))) {
href = linkForNode(n, relative);
@@ -3457,8 +3453,7 @@ void DocBookGenerator::generateSynopsis(const Node *node, const Node *relative,
// Then generate the synopsis.
if (style == Section::Details) {
if (!node->isRelatedNonmember() && !node->isProxyNode() && !node->parent()->name().isEmpty()
- && !node->parent()->isHeader() && !node->isProperty() && !node->isQmlNode()
- && !node->isJsNode()) {
+ && !node->parent()->isHeader() && !node->isProperty() && !node->isQmlNode()) {
m_writer->writeCharacters(taggedNode(node->parent()) + "::");
}
}
@@ -3977,7 +3972,7 @@ void DocBookGenerator::generateSectionInheritedList(const Section &section, cons
/*!
Generate the DocBook page for an entity that doesn't map
- to any underlying parsable C++, QML, or Javascript element.
+ to any underlying parsable C++ or QML element.
*/
void DocBookGenerator::generatePageNode(PageNode *pn)
{
@@ -4032,11 +4027,7 @@ void DocBookGenerator::generateQmlTypePage(QmlTypeNode *qcn)
m_writer = startDocument(qcn);
Generator::setQmlTypeContext(qcn);
- QString title = qcn->fullTitle();
- if (qcn->isJsType())
- title += " JavaScript Type";
- else
- title += " QML Type";
+ const QString title = qcn->fullTitle() + " QML Type";
generateHeader(title, qcn->subtitle(), qcn);
generateQmlRequisites(qcn);
@@ -4082,11 +4073,7 @@ void DocBookGenerator::generateQmlBasicTypePage(QmlValueTypeNode *qbtn)
Q_ASSERT(m_writer == nullptr);
m_writer = startDocument(qbtn);
- QString htmlTitle = qbtn->fullTitle();
- if (qbtn->isJsType())
- htmlTitle += " JavaScript Basic Type";
- else
- htmlTitle += " QML Basic Type";
+ const QString htmlTitle = qbtn->fullTitle() + " QML Basic Type";
Sections sections(qbtn);
generateHeader(htmlTitle, qbtn->subtitle(), qbtn);
@@ -4177,7 +4164,7 @@ void DocBookGenerator::generateDetailedQmlMember(Node *node, const Aggregate *re
const QList<Node *> sharedNodes = scn->collective();
for (const auto &node : sharedNodes) {
- if (node->isQmlProperty() || node->isJsProperty()) {
+ if (node->isQmlProperty()) {
auto *qpn = static_cast<QmlPropertyNode *>(node);
m_writer->writeStartElement(dbNamespace, "bridgehead");
@@ -4190,7 +4177,7 @@ void DocBookGenerator::generateDetailedQmlMember(Node *node, const Aggregate *re
generateDocBookSynopsis(qpn);
}
}
- } else if (node->isQmlProperty() || node->isJsProperty()) {
+ } else if (node->isQmlProperty()) {
auto qpn = static_cast<QmlPropertyNode *>(node);
startSection(qpn, getQmlPropertyTitle(qpn));
generateDocBookSynopsis(qpn);
@@ -4203,8 +4190,7 @@ void DocBookGenerator::generateDetailedQmlMember(Node *node, const Aggregate *re
int i = 0;
for (const auto m : sharedNodes) {
// Ignore this element if there is nothing to generate.
- if (!node->isFunction(Node::QML) && !node->isFunction(Node::JS)
- && !node->isQmlProperty() && !node->isJsProperty()) {
+ if (!node->isFunction(Node::QML) && !node->isQmlProperty()) {
continue;
}
@@ -4217,9 +4203,9 @@ void DocBookGenerator::generateDetailedQmlMember(Node *node, const Aggregate *re
}
// Write the title.
- if (node->isFunction(Node::QML) || node->isFunction(Node::JS))
+ if (node->isFunction(Node::QML))
generateQmlMethodTitle(node);
- else if (node->isQmlProperty() || node->isJsProperty())
+ else if (node->isQmlProperty())
m_writer->writeCharacters(
getQmlPropertyTitle(static_cast<QmlPropertyNode *>(node)));
@@ -4269,26 +4255,23 @@ void DocBookGenerator::generateDocumentation(Node *node)
if (node->parent()) {
if (node->isCollectionNode()) {
/*
- A collection node collects: groups, C++ modules,
- QML modules or JavaScript modules. Testing for a
- CollectionNode must be done before testing for a
- TextPageNode because a CollectionNode is a PageNode
- at this point.
+ A collection node collects: groups, C++ modules, or QML
+ modules. Testing for a CollectionNode must be done
+ before testing for a TextPageNode because a
+ CollectionNode is a PageNode at this point.
- Don't output an HTML page for the collection
- node unless the \group, \module, \qmlmodule or
- \jsmodule command was actually seen by qdoc in
- the qdoc comment for the node.
+ Don't output an HTML page for the collection node unless
+ the \group, \module, or \qmlmodule command was actually
+ seen by qdoc in the qdoc comment for the node.
A key prerequisite in this case is the call to
- mergeCollections(cn). We must determine whether
- this group, module, QML module, or JavaScript
- module has members in other modules. We know at
- this point that cn's members list contains only
- members in the current module. Therefore, before
- outputting the page for cn, we must search for
- members of cn in the other modules and add them
- to the members list.
+ mergeCollections(cn). We must determine whether this
+ group, module, or QML module has members in other
+ modules. We know at this point that cn's members list
+ contains only members in the current module. Therefore,
+ before outputting the page for cn, we must search for
+ members of cn in the other modules and add them to the
+ members list.
*/
auto cn = static_cast<CollectionNode *>(node);
if (cn->wasSeen()) {
@@ -4306,9 +4289,9 @@ void DocBookGenerator::generateDocumentation(Node *node)
if ((node->isClassNode() || node->isHeader() || node->isNamespace())
&& node->docMustBeGenerated()) {
generateCppReferencePage(static_cast<Aggregate *>(node));
- } else if (node->isQmlType() || node->isJsType()) {
+ } else if (node->isQmlType()) {
generateQmlTypePage(static_cast<QmlTypeNode *>(node));
- } else if (node->isQmlBasicType() || node->isJsBasicType()) {
+ } else if (node->isQmlBasicType()) {
generateQmlBasicTypePage(static_cast<QmlValueTypeNode *>(node));
} else if (node->isProxyNode()) {
generateProxyPage(static_cast<Aggregate *>(node));
@@ -4439,14 +4422,14 @@ void DocBookGenerator::generateCollectionNode(CollectionNode *cn)
// generateAlsoList generates something.
!cn->doc().alsoList().empty() ||
// generateAnnotatedList generates something.
- (!cn->noAutoList() && (cn->isGroup() || cn->isQmlModule() || cn->isJsModule()))) {
+ (!cn->noAutoList() && (cn->isGroup() || cn->isQmlModule()))) {
writeAnchor("details");
}
generateBody(cn);
generateAlsoList(cn);
- if (!cn->noAutoList() && (cn->isGroup() || cn->isQmlModule() || cn->isJsModule()))
+ if (!cn->noAutoList() && (cn->isGroup() || cn->isQmlModule()))
generateAnnotatedList(cn, cn->members(), "members");
if (generatedTitle)
diff --git a/src/qdoc/docparser.cpp b/src/qdoc/docparser.cpp
index 7076832f5..45bdfef2b 100644
--- a/src/qdoc/docparser.cpp
+++ b/src/qdoc/docparser.cpp
@@ -1128,8 +1128,8 @@ void DocParser::parse(const QString &source, DocPrivate *docPrivate,
appendWord(cmdStr);
} else {
if (!cmdStr.endsWith("propertygroup")) {
- // The QML and JS property group commands are no longer required
- // for grouping QML and JS properties. They are allowed but ignored.
+ // The QML property group commands are no longer required
+ // for grouping QML properties. They are allowed but ignored.
location().warning(QStringLiteral("Unknown command '\\%1'").arg(cmdStr),
detailsUnknownCommand(metaCommandSet, cmdStr));
}
diff --git a/src/qdoc/functionnode.cpp b/src/qdoc/functionnode.cpp
index 4819187d4..1d8f6b3a4 100644
--- a/src/qdoc/functionnode.cpp
+++ b/src/qdoc/functionnode.cpp
@@ -11,15 +11,15 @@ QT_BEGIN_NAMESPACE
\class FunctionNode
This node is used to represent any kind of function being
- documented. It can represent a C++ class member function,
- a C++ global function, a QML method, a javascript method,
- or a macro, with or without parameters.
+ documented. It can represent a C++ class member function, a C++
+ global function, a QML method, or a macro, with or without
+ parameters.
A C++ function can be a signal a slot, a constructor of any
kind, a destructor, a copy or move assignment operator, or
just a plain old member function or global function.
- A QML or javascript method can be a plain old method, or a
+ A QML method can be a plain old method, or a
signal or signal handler.
If the function is not an overload, its overload flag is
@@ -171,9 +171,6 @@ static void buildMetanessMap()
metanessMap_["qmlsignal"] = FunctionNode::QmlSignal;
metanessMap_["qmlsignalhandler"] = FunctionNode::QmlSignalHandler;
metanessMap_["qmlmethod"] = FunctionNode::QmlMethod;
- metanessMap_["jssignal"] = FunctionNode::JsSignal;
- metanessMap_["jssignalhandler"] = FunctionNode::JsSignalHandler;
- metanessMap_["jsmethos"] = FunctionNode::JsMethod;
}
static QMap<QString, FunctionNode::Metaness> topicMetanessMap_;
@@ -184,10 +181,6 @@ static void buildTopicMetanessMap()
topicMetanessMap_["qmlattachedsignal"] = FunctionNode::QmlSignal;
topicMetanessMap_["qmlmethod"] = FunctionNode::QmlMethod;
topicMetanessMap_["qmlattachedmethod"] = FunctionNode::QmlMethod;
- topicMetanessMap_["jssignal"] = FunctionNode::JsSignal;
- topicMetanessMap_["jsattachedsignal"] = FunctionNode::JsSignal;
- topicMetanessMap_["jsmethod"] = FunctionNode::JsMethod;
- topicMetanessMap_["jsattachedmethod"] = FunctionNode::JsMethod;
}
/*!
@@ -216,11 +209,8 @@ Node::Genus FunctionNode::getGenus(FunctionNode::Metaness metaness)
case FunctionNode::QmlSignalHandler:
case FunctionNode::QmlMethod:
return Node::QML;
- case FunctionNode::JsSignal:
- case FunctionNode::JsSignalHandler:
- case FunctionNode::JsMethod:
- return Node::JS;
}
+
return Node::DontCare;
}
@@ -247,46 +237,6 @@ FunctionNode::Metaness FunctionNode::getMetanessFromTopic(const QString &topic)
}
/*!
- If this function node's metaness is \a from, change the
- metaness to \a to and return \c true. Otherwise return
- false. This function is used to change Qml function node
- metaness values to Javascript function node metaness,
- values because these nodes are created as Qml function
- nodes before it is discovered that what the function node
- represents is not a Qml function but a javascript function.
-
- Note that if the function returns true, which means the node
- type was indeed changed, then the node's Genus is also changed
- from QML to JS.
-
- The function also works in the other direction, but there is
- no use case for that.
- */
-bool FunctionNode::changeMetaness(Metaness from, Metaness to)
-{
- if (m_metaness == from) {
- m_metaness = to;
- switch (to) {
- case QmlSignal:
- case QmlSignalHandler:
- case QmlMethod:
- setGenus(Node::QML);
- break;
- case JsSignal:
- case JsSignalHandler:
- case JsMethod:
- setGenus(Node::JS);
- break;
- default:
- setGenus(Node::CPP);
- break;
- }
- return true;
- }
- return false;
-}
-
-/*!
Sets the function node's overload number to \a number. If \a number
is 0, the function node's overload flag is set to false. If
\a number is greater than 0, the overload flag is set to true.
@@ -377,12 +327,6 @@ QString FunctionNode::kindString() const
return "QML signal handler";
case FunctionNode::QmlMethod:
return "QML method";
- case FunctionNode::JsSignal:
- return "JS signal";
- case FunctionNode::JsSignalHandler:
- return "JS signal handler";
- case FunctionNode::JsMethod:
- return "JS method";
default:
return "function";
}
@@ -425,12 +369,6 @@ QString FunctionNode::metanessString() const
return "qmlsignalhandler";
case FunctionNode::QmlMethod:
return "qmlmethod";
- case FunctionNode::JsSignal:
- return "jssignal";
- case FunctionNode::JsSignalHandler:
- return "jssignalhandler";
- case FunctionNode::JsMethod:
- return "jsmethod";
default:
return "plain";
}
diff --git a/src/qdoc/functionnode.h b/src/qdoc/functionnode.h
index 0daeacc43..e62b347de 100644
--- a/src/qdoc/functionnode.h
+++ b/src/qdoc/functionnode.h
@@ -34,9 +34,6 @@ public:
QmlSignal,
QmlSignalHandler,
QmlMethod,
- JsSignal,
- JsSignalHandler,
- JsMethod
};
FunctionNode(Aggregate *parent, const QString &name); // C++ function (Plain)
@@ -45,7 +42,6 @@ public:
Node *clone(Aggregate *parent) override;
[[nodiscard]] Metaness metaness() const { return m_metaness; }
[[nodiscard]] QString metanessString() const;
- bool changeMetaness(Metaness from, Metaness to);
void setMetaness(Metaness metaness) { m_metaness = metaness; }
[[nodiscard]] QString kindString() const;
static Metaness getMetaness(const QString &value);
@@ -89,10 +85,6 @@ public:
[[nodiscard]] bool isCAssign() const { return (m_metaness == CAssign); }
[[nodiscard]] bool isMAssign() const { return (m_metaness == MAssign); }
- [[nodiscard]] bool isJsMethod() const { return (m_metaness == JsMethod); }
- [[nodiscard]] bool isJsSignal() const { return (m_metaness == JsSignal); }
- [[nodiscard]] bool isJsSignalHandler() const { return (m_metaness == JsSignalHandler); }
-
[[nodiscard]] bool isQmlMethod() const { return (m_metaness == QmlMethod); }
[[nodiscard]] bool isQmlSignal() const { return (m_metaness == QmlSignal); }
[[nodiscard]] bool isQmlSignalHandler() const { return (m_metaness == QmlSignalHandler); }
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index 02d29b7fe..8c99c3e1e 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -283,8 +283,6 @@ QString Generator::fileBase(const Node *node) const
if (node->isQmlModule())
base.append("-qmlmodule");
- else if (node->isJsModule())
- base.append("-jsmodule");
else if (node->isModule())
base.append("-module");
// Why not add "-group" for group pages?
@@ -297,8 +295,7 @@ QString Generator::fileBase(const Node *node) const
base.prepend(s_project.toLower() + QLatin1Char('-'));
base.append(QLatin1String("-example"));
}
- } else if (node->isQmlType() || node->isQmlBasicType() || node->isJsType()
- || node->isJsBasicType()) {
+ } else if (node->isQmlType() || node->isQmlBasicType()) {
base = node->name();
/*
To avoid file name conflicts in the html directory,
@@ -497,8 +494,7 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
parentName = fileBase(node) + QLatin1Char('.') + currentGenerator()->fileExtension();
else
return QString();
- } else if (node->isQmlType() || node->isQmlBasicType() || node->isJsType()
- || node->isJsBasicType()) {
+ } else if (node->isQmlType() || node->isQmlBasicType()) {
QString fb = fileBase(node);
if (fb.startsWith(outputPrefix(node)))
return fb + QLatin1Char('.') + currentGenerator()->fileExtension();
@@ -535,15 +531,12 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
case Node::Function: {
const auto *fn = static_cast<const FunctionNode *>(node);
switch (fn->metaness()) {
- case FunctionNode::JsSignal:
case FunctionNode::QmlSignal:
anchorRef = QLatin1Char('#') + node->name() + "-signal";
break;
- case FunctionNode::JsSignalHandler:
case FunctionNode::QmlSignalHandler:
anchorRef = QLatin1Char('#') + node->name() + "-signal-handler";
break;
- case FunctionNode::JsMethod:
case FunctionNode::QmlMethod:
anchorRef = QLatin1Char('#') + node->name() + "-method";
break;
@@ -584,7 +577,6 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
if (!node->isPropertyGroup())
break;
} Q_FALLTHROUGH();
- case Node::JsProperty:
case Node::QmlProperty:
if (node->isAttached())
anchorRef = QLatin1Char('#') + node->name() + "-attached-prop";
@@ -594,13 +586,11 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
case Node::Variable:
anchorRef = QLatin1Char('#') + node->name() + "-var";
break;
- case Node::JsType:
case Node::QmlType:
case Node::Page:
case Node::Group:
case Node::HeaderFile:
case Node::Module:
- case Node::JsModule:
case Node::QmlModule: {
parentName = fileBase(node);
parentName.replace(QLatin1Char('/'), QLatin1Char('-'))
@@ -1032,26 +1022,23 @@ void Generator::generateDocumentation(Node *node)
if (node->parent() != nullptr) {
if (node->isCollectionNode()) {
/*
- A collection node collects: groups, C++ modules,
- QML modules or JavaScript modules. Testing for a
- CollectionNode must be done before testing for a
- TextPageNode because a CollectionNode is a PageNode
- at this point.
+ A collection node collects: groups, C++ modules, or QML
+ modules. Testing for a CollectionNode must be done
+ before testing for a TextPageNode because a
+ CollectionNode is a PageNode at this point.
- Don't output an HTML page for the collection
- node unless the \group, \module, \qmlmodule or
- \jsmodule command was actually seen by qdoc in
- the qdoc comment for the node.
+ Don't output an HTML page for the collection node unless
+ the \group, \module, or \qmlmodule command was actually
+ seen by qdoc in the qdoc comment for the node.
A key prerequisite in this case is the call to
- mergeCollections(cn). We must determine whether
- this group, module, QML module, or JavaScript
- module has members in other modules. We know at
- this point that cn's members list contains only
- members in the current module. Therefore, before
- outputting the page for cn, we must search for
- members of cn in the other modules and add them
- to the members list.
+ mergeCollections(cn). We must determine whether this
+ group, module or QML module has members in other
+ modules. We know at this point that cn's members list
+ contains only members in the current module. Therefore,
+ before outputting the page for cn, we must search for
+ members of cn in the other modules and add them to the
+ members list.
*/
auto *cn = static_cast<CollectionNode *>(node);
if (cn->wasSeen()) {
@@ -1081,12 +1068,12 @@ void Generator::generateDocumentation(Node *node)
beginSubPage(node, fileName(node));
generateCppReferencePage(static_cast<Aggregate *>(node), marker);
endSubPage();
- } else if (node->isQmlType() || node->isJsType()) {
+ } else if (node->isQmlType()) {
beginSubPage(node, fileName(node));
auto *qcn = static_cast<QmlTypeNode *>(node);
generateQmlTypePage(qcn, marker);
endSubPage();
- } else if (node->isQmlBasicType() || node->isJsBasicType()) {
+ } else if (node->isQmlBasicType()) {
beginSubPage(node, fileName(node));
auto *qbtn = static_cast<QmlValueTypeNode *>(node);
generateQmlBasicTypePage(qbtn, marker);
@@ -1671,7 +1658,6 @@ void Generator::initialize()
config.getString(CONFIG_OUTPUTPREFIXES + Config::dot + prefix);
} else {
s_outputPrefixes[QLatin1String("QML")] = QLatin1String("qml-");
- s_outputPrefixes[QLatin1String("JS")] = QLatin1String("js-");
}
s_outputSuffixes.clear();
@@ -1819,22 +1805,20 @@ QString Generator::outFileName()
QString Generator::outputPrefix(const Node *node)
{
- // Prefix is applied to QML and JS types
+ // Prefix is applied to QML types
if (node->isQmlType() || node->isQmlBasicType())
return s_outputPrefixes[QLatin1String("QML")];
- if (node->isJsType() || node->isJsBasicType())
- return s_outputPrefixes[QLatin1String("JS")];
+
return QString();
}
QString Generator::outputSuffix(const Node *node)
{
- // Suffix is applied to QML and JS types, as
+ // Suffix is applied to QML types, as
// well as module pages.
if (node->isQmlModule() || node->isQmlType() || node->isQmlBasicType())
return s_outputSuffixes[QLatin1String("QML")];
- if (node->isJsModule() || node->isJsType() || node->isJsBasicType())
- return s_outputSuffixes[QLatin1String("JS")];
+
return QString();
}
@@ -2082,7 +2066,6 @@ QString Generator::typeString(const Node *node)
return "union";
case Node::QmlType:
case Node::QmlValueType:
- case Node::JsBasicType:
return "type";
case Node::Page:
return "documentation";
@@ -2094,13 +2077,10 @@ QString Generator::typeString(const Node *node)
case Node::Function: {
const auto fn = static_cast<const FunctionNode *>(node);
switch (fn->metaness()) {
- case FunctionNode::JsSignal:
case FunctionNode::QmlSignal:
return "signal";
- case FunctionNode::JsSignalHandler:
case FunctionNode::QmlSignalHandler:
return "signal handler";
- case FunctionNode::JsMethod:
case FunctionNode::QmlMethod:
return "method";
case FunctionNode::MacroWithParams:
@@ -2115,7 +2095,6 @@ QString Generator::typeString(const Node *node)
case Node::QmlProperty:
return "property";
case Node::Module:
- case Node::JsModule:
case Node::QmlModule:
return "module";
case Node::SharedComment: {
diff --git a/src/qdoc/helpprojectwriter.cpp b/src/qdoc/helpprojectwriter.cpp
index d507f9e0e..8d3f22c2d 100644
--- a/src/qdoc/helpprojectwriter.cpp
+++ b/src/qdoc/helpprojectwriter.cpp
@@ -124,10 +124,8 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList
typeHash["variable"] = Node::Variable;
typeHash["group"] = Node::Group;
typeHash["module"] = Node::Module;
- typeHash["jsmodule"] = Node::JsModule;
typeHash["qmlmodule"] = Node::QmlModule;
- typeHash["qmlproperty"] = Node::JsProperty;
- typeHash["jsproperty"] = Node::QmlProperty;
+ typeHash["qmlproperty"] = Node::QmlProperty;
typeHash["qmlclass"] = Node::QmlType; // Legacy alias for 'qmltype'
typeHash["qmltype"] = Node::QmlType;
typeHash["qmlbasictype"] = Node::QmlValueType; // Legacy alias for 'qmlvaluetype'
@@ -149,8 +147,7 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList
for (const auto &piece : qAsConst(pieces)) {
if (typeHash[typeName] == Node::Group
|| typeHash[typeName] == Node::Module
- || typeHash[typeName] == Node::QmlModule
- || typeHash[typeName] == Node::JsModule) {
+ || typeHash[typeName] == Node::QmlModule) {
subproject.m_groups << piece.toLower();
}
}
@@ -187,8 +184,6 @@ Keyword HelpProjectWriter::keywordDetails(const Node *node) const
ids << "QML." + moduleName + majorVersion + "." + name;
}
return Keyword(name, ids, ref);
- } else if (node->isJsType() || node->isJsBasicType()) {
- return Keyword(node->name(), "JS." + node->name(), ref);
} else if (node->isTextPageNode()) {
const auto *pageNode = static_cast<const PageNode *>(node);
return Keyword(pageNode->fullTitle(), pageNode->fullTitle(), ref);
@@ -256,8 +251,6 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QXmlStreamWriter &
break;
case Node::QmlType:
case Node::QmlValueType:
- case Node::JsType:
- case Node::JsBasicType:
if (node->doc().hasKeywords()) {
const auto keywords = node->doc().keywords();
for (const Atom *keyword : keywords) {
@@ -302,8 +295,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QXmlStreamWriter &
case Node::Group:
case Node::Module:
- case Node::QmlModule:
- case Node::JsModule: {
+ case Node::QmlModule: {
const auto *cn = static_cast<const CollectionNode *>(node);
if (!cn->fullTitle().isEmpty()) {
if (cn->doc().hasKeywords()) {
@@ -325,7 +317,6 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QXmlStreamWriter &
case Node::Property:
case Node::QmlProperty:
- case Node::JsProperty:
project.m_keywords.append(keywordDetails(node));
break;
@@ -333,13 +324,11 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QXmlStreamWriter &
const auto *funcNode = static_cast<const FunctionNode *>(node);
/*
- QML and JS methods, signals, and signal handlers used to be node types,
+ QML methods, signals, and signal handlers used to be node types,
but now they are Function nodes with a Metaness value that specifies
- what kind of function they are, QmlSignal, JsSignal, QmlMethod, etc. It
- suffices at this point to test whether the node is of the QML or JS Genus,
- because we already know it is NodeType::Function.
- */
- if (funcNode->isQmlNode() || funcNode->isJsNode()) {
+ what kind of function they are, QmlSignal, QmlMethod, etc.
+ */
+ if (funcNode->isQmlNode()) {
project.m_keywords.append(keywordDetails(node));
break;
}
@@ -489,7 +478,7 @@ void HelpProjectWriter::writeSection(QXmlStreamWriter &writer, const QString &pa
*/
void HelpProjectWriter::addMembers(HelpProject &project, QXmlStreamWriter &writer, const Node *node)
{
- if (node->isQmlBasicType() || node->isJsBasicType())
+ if (node->isQmlBasicType())
return;
QString href = m_gen->fullDocumentLocation(node, false);
@@ -504,8 +493,7 @@ void HelpProjectWriter::addMembers(HelpProject &project, QXmlStreamWriter &write
// Do not generate a 'List of all members' for namespaces or header files,
// but always generate it for derived classes and QML classes
if (!node->isNamespace() && !node->isHeader()
- && (derivedClass || node->isQmlType() || node->isJsType()
- || !project.m_memberStatus[node].isEmpty())) {
+ && (derivedClass || node->isQmlType() || !project.m_memberStatus[node].isEmpty())) {
QString membersPath = href + QStringLiteral("-members.html");
writeSection(writer, membersPath, QStringLiteral("List of all members"));
}
@@ -526,9 +514,7 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer
case Node::Struct:
case Node::Union:
case Node::QmlType:
- case Node::JsType:
- case Node::QmlValueType:
- case Node::JsBasicType: {
+ case Node::QmlValueType: {
QString typeStr = m_gen->typeString(node);
if (!typeStr.isEmpty())
typeStr[0] = typeStr[0].toTitleCase();
@@ -554,7 +540,6 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer
case Node::Page:
case Node::Group:
case Node::Module:
- case Node::JsModule:
case Node::QmlModule: {
writer.writeStartElement("section");
writer.writeAttribute("ref", href);
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
index abedd5502..36acda495 100644
--- a/src/qdoc/htmlgenerator.cpp
+++ b/src/qdoc/htmlgenerator.cpp
@@ -1362,11 +1362,7 @@ void HtmlGenerator::generateQmlTypePage(QmlTypeNode *qcn, CodeMarker *marker)
{
Generator::setQmlTypeContext(qcn);
SubTitleSize subTitleSize = LargeSubTitle;
- QString htmlTitle = qcn->fullTitle();
- if (qcn->isJsType())
- htmlTitle += " JavaScript Type";
- else
- htmlTitle += " QML Type";
+ QString htmlTitle = qcn->fullTitle() + " QML Type";
generateHeader(htmlTitle, qcn, marker);
Sections sections(qcn);
@@ -1441,11 +1437,7 @@ void HtmlGenerator::generateQmlTypePage(QmlTypeNode *qcn, CodeMarker *marker)
void HtmlGenerator::generateQmlBasicTypePage(QmlValueTypeNode *qbtn, CodeMarker *marker)
{
SubTitleSize subTitleSize = LargeSubTitle;
- QString htmlTitle = qbtn->fullTitle();
- if (qbtn->isJsType())
- htmlTitle += " JavaScript Basic Type";
- else
- htmlTitle += " QML Basic Type";
+ QString htmlTitle = qbtn->fullTitle() + " QML Basic Type";
marker = CodeMarker::markerForLanguage(QLatin1String("QML"));
@@ -1490,7 +1482,7 @@ void HtmlGenerator::generateQmlBasicTypePage(QmlValueTypeNode *qbtn, CodeMarker
/*!
Generate the HTML page for an entity that doesn't map
- to any underlying parsable C++, QML, or Javascript element.
+ to any underlying parsable C++ or QML element.
*/
void HtmlGenerator::generatePageNode(PageNode *pn, CodeMarker *marker)
{
@@ -1581,7 +1573,7 @@ void HtmlGenerator::generateCollectionNode(CollectionNode *cn, CodeMarker *marke
generateExtractionMark(cn, EndMark);
if (!cn->noAutoList()) {
- if (cn->isGroup() || cn->isQmlModule() || cn->isJsModule())
+ if (cn->isGroup() || cn->isQmlModule())
generateAnnotatedList(cn, marker, cn->members());
}
generateFooter(cn);
@@ -1688,8 +1680,7 @@ void HtmlGenerator::generateNavigationBar(const QString &title, const Node *node
addNavItem(moduleNode->name(), moduleNode->name() + moduleState);
}
navigationbar << Atom(itemLeft) << Atom(Atom::String, node->name()) << Atom(itemRight);
- } else if (node->isQmlType() || node->isQmlBasicType() || node->isJsType()
- || node->isJsBasicType()) {
+ } else if (node->isQmlType() || node->isQmlBasicType()) {
if (!m_qmltypespage.isEmpty() && !m_qmltypestitle.isEmpty())
addNavItem(m_qmltypespage, m_qmltypestitle);
if (moduleNode && (!moduleState.isEmpty() || moduleNode->title() != m_qmltypespage)) {
@@ -2321,9 +2312,7 @@ void HtmlGenerator::generateTableOfContents(const Node *node, CodeMarker *marker
break;
}
}
- } else if (sections
- && (node->isClassNode() || node->isNamespace() || node->isQmlType() ||
- node->isJsType() || node->isQmlBasicType() || node->isJsBasicType())) {
+ } else if (sections && (node->isClassNode() || node->isNamespace() || node->isQmlType() || node->isQmlBasicType())) {
for (const auto &section : qAsConst(*sections)) {
if (!section.members().isEmpty()) {
openUnorderedList();
@@ -2839,7 +2828,7 @@ void HtmlGenerator::generateCompactList(ListType listType, const Node *relative,
}
QStringList pieces;
- if (it.value()->isQmlType() || it.value()->isJsType()) {
+ if (it.value()->isQmlType()) {
QString name = it.value()->name();
next = it;
++next;
@@ -2991,8 +2980,6 @@ void HtmlGenerator::generateList(const Node *relative, CodeMarker *marker, const
type = Node::Module;
else if (selector == QLatin1String("qml-modules"))
type = Node::QmlModule;
- else if (selector == QLatin1String("js-modules"))
- type = Node::JsModule;
if (type != Node::NoType) {
NodeList nodeList;
m_qdb->mergeCollections(type, cnm, relative);
@@ -3004,13 +2991,13 @@ void HtmlGenerator::generateList(const Node *relative, CodeMarker *marker, const
} else {
/*
\generatelist {selector} is only allowed in a
- comment where the topic is \group, \module,
- \qmlmodule, or \jsmodule
+ comment where the topic is \group, \module, or
+ \qmlmodule.
*/
if (relative && !relative->isCollectionNode()) {
relative->doc().location().warning(
QStringLiteral("\\generatelist {%1} is only allowed in \\group, "
- "\\module, \\qmlmodule, and \\jsmodule comments.")
+ "\\module and \\qmlmodule comments.")
.arg(selector));
return;
}
@@ -3255,7 +3242,7 @@ QString HtmlGenerator::highlightedCode(const QString &markedCode, const Node *re
par1 = QStringView();
const Node *n = m_qdb->findTypeNode(arg.toString(), relative, genus);
html += QLatin1String("<span class=\"type\">");
- if (n && (n->isQmlBasicType() || n->isJsBasicType())) {
+ if (n && (n->isQmlBasicType())) {
if (relative && (relative->genus() == n->genus() || genus == n->genus()))
addLink(linkForNode(n, relative), arg, &html);
else
@@ -3598,7 +3585,7 @@ void HtmlGenerator::generateQmlSummary(const NodeVector &members, const Node *re
out() << "<ul>\n";
const QList<Node *> &sharedNodes = scn->collective();
for (const auto &node : sharedNodes) {
- if (node->isQmlProperty() || node->isJsProperty()) {
+ if (node->isQmlProperty()) {
out() << "<li class=\"fn\">";
generateQmlItem(node, relative, marker, true);
out() << "</li>\n";
@@ -3681,11 +3668,11 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node, const Aggregate *relat
}
const QList<Node *> sharedNodes = scn->collective();
for (const auto &sharedNode : sharedNodes) {
- if (sharedNode->isQmlProperty() || sharedNode->isJsProperty())
+ if (sharedNode->isQmlProperty())
generateQmlProperty(static_cast<QmlPropertyNode *>(sharedNode));
}
out() << qmlItemFooter;
- } else if (node->isQmlProperty() || node->isJsProperty()) {
+ } else if (node->isQmlProperty()) {
out() << qmlItemHeader;
generateQmlProperty(static_cast<QmlPropertyNode *>(node));
out() << qmlItemFooter;
@@ -3697,9 +3684,9 @@ void HtmlGenerator::generateDetailedQmlMember(Node *node, const Aggregate *relat
out() << qmlItemHeader;
for (const auto &sharedNode : sharedNodes) {
// Generate the node only if it is relevant for Qt Quick.
- if (sharedNode->isFunction(Node::QML) || sharedNode->isFunction(Node::JS))
+ if (sharedNode->isFunction(Node::QML))
generateQmlMethod(sharedNode);
- else if (sharedNode->isQmlProperty() || sharedNode->isJsProperty())
+ else if (sharedNode->isQmlProperty())
generateQmlProperty(static_cast<QmlPropertyNode *>(sharedNode));
}
out() << qmlItemFooter;
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index 15ba731f5..4ab245efa 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -91,47 +91,6 @@ void Node::initialize()
}
/*!
- If this Node's type is \a from, change the type to \a to
- and return \c true. Otherwise return false. This function
- is used to change Qml node types to Javascript node types,
- because these nodes are created as Qml nodes before it is
- discovered that the entity represented by the node is not
- Qml but javascript.
-
- Note that if the function returns true, which means the node
- type was indeed changed, then the node's Genus is also changed
- from QML to JS.
-
- The function also works in the other direction, but there is
- no use case for that.
- */
-bool Node::changeType(NodeType from, NodeType to)
-{
- if (m_nodeType == from) {
- m_nodeType = to;
- switch (to) {
- case QmlType:
- case QmlModule:
- case QmlProperty:
- case QmlValueType:
- setGenus(Node::QML);
- break;
- case JsType:
- case JsModule:
- case JsProperty:
- case JsBasicType:
- setGenus(Node::JS);
- break;
- default:
- setGenus(Node::CPP);
- break;
- }
- return true;
- }
- return false;
-}
-
-/*!
Returns \c true if the node \a n1 is less than node \a n2. The
comparison is performed by comparing properties of the nodes
in order of increasing complexity.
@@ -187,7 +146,7 @@ bool Node::nodeNameLessThan(const Node *n1, const Node *n2)
\value ExternalPage The Node subclass is ExternalPageNode, which is for
linking to an external page.
\value Function The Node subclass is FunctionNode, which can represent C++,
- QML, and Javascript functions.
+ and QML functions.
\value Typedef The Node subclass is TypedefNode, which represents a C++
typedef.
\value Property The Node subclass is PropertyNode, which represents a use of
@@ -205,14 +164,6 @@ bool Node::nodeNameLessThan(const Node *n1, const Node *n2)
property in a QML type.
\value QmlBasicType The Node subclass is QmlBasicTypeNode, which represents a
basic type like int, etc.
- \value JsType The Node subclass is QmlTypeNode, which represents a javascript
- type.
- \value JsModule The Node subclass is CollectionNode, which represents a
- javascript module.
- \value JsProperty The Node subclass is QmlPropertyNode, which represents a
- javascript property.
- \value JsBasicType The Node subclass is QmlBasicTypeNode, which represents a
- basic type like int, etc.
\value SharedComment The Node subclass is SharedCommentNode, which represents
a collection of nodes that share the same documentation comment.
\omitvalue Collection
@@ -226,14 +177,13 @@ bool Node::nodeNameLessThan(const Node *n1, const Node *n2)
\enum Node::Genus
An unsigned char value that specifies whether the Node represents a
- C++ element, a QML element, a javascript element, or a text document.
+ C++ element, a QML element, or a text document.
The Genus values are also passed to search functions to specify the
Genus of Tree Node that can satisfy the search.
\value DontCare The Genus is not specified. Used when calling Tree search functions to indicate
the search can accept any Genus of Node.
\value CPP The Node represents a C++ element.
- \value JS The Node represents a javascript element.
\value QML The Node represents a QML element.
\value DOC The Node represents a text document.
*/
@@ -369,26 +319,6 @@ bool Node::nodeNameLessThan(const Node *n1, const Node *n2)
Returns true if this node was created from something in an index file.
*/
-/*! \fn bool Node::isJsBasicType() const
- Returns true if the node type is \c JsBasicType.
- */
-
-/*! \fn bool Node::isJsModule() const
- Returns true if the node type is \c JsModule.
- */
-
-/*! \fn bool Node::isJsNode() const
- Returns true if this node's Genus value is \c JS.
- */
-
-/*! \fn bool Node::isJsProperty() const
- Returns true if the node type is \c JsProperty.
- */
-
-/*! \fn bool Node::isJsType() const
- Returns true if the node type is \c JsType.
- */
-
/*! \fn bool Node::isModule() const
Returns true if the node type is \c Module.
*/
@@ -709,9 +639,6 @@ Node::PageType Node::getPageType(Node::NodeType t)
case Node::QmlType:
case Node::QmlProperty:
case Node::QmlValueType:
- case Node::JsType:
- case Node::JsProperty:
- case Node::JsBasicType:
case Node::SharedComment:
return Node::ApiPage;
case Node::Example:
@@ -722,7 +649,6 @@ Node::PageType Node::getPageType(Node::NodeType t)
case Node::Group:
case Node::Module:
case Node::QmlModule:
- case Node::JsModule:
case Node::Collection:
return Node::OverviewPage;
case Node::Proxy:
@@ -760,11 +686,6 @@ Node::Genus Node::getGenus(Node::NodeType t)
case Node::QmlProperty:
case Node::QmlValueType:
return Node::QML;
- case Node::JsType:
- case Node::JsModule:
- case Node::JsProperty:
- case Node::JsBasicType:
- return Node::JS;
case Node::Page:
case Node::Group:
case Node::Example:
@@ -860,15 +781,6 @@ QString Node::nodeTypeString(NodeType t)
case QmlProperty:
return QLatin1String("QML property");
- case JsType:
- return QLatin1String("JS type");
- case JsBasicType:
- return QLatin1String("JS basic type");
- case JsModule:
- return QLatin1String("JS module");
- case JsProperty:
- return QLatin1String("JS property");
-
case SharedComment:
return QLatin1String("shared comment");
case Collection:
@@ -1013,18 +925,18 @@ Node::ThreadSafeness Node::inheritedThreadSafeness() const
}
/*!
- If this node is a QML or JS type node, return a pointer to
- it. If it is a child of a QML or JS type node, return the
- pointer to its parent QMLor JS type node. Otherwise return
+ If this node is a QML type node, return a pointer to
+ it. If it is a child of a QML type node, return the
+ pointer to its parent QML type node. Otherwise return
0;
*/
QmlTypeNode *Node::qmlTypeNode()
{
- if (isQmlNode() || isJsNode()) {
+ if (isQmlNode()) {
Node *n = this;
- while (n && !(n->isQmlType() || n->isJsType()))
+ while (n && !(n->isQmlType()))
n = n->parent();
- if (n && (n->isQmlType() || n->isJsType()))
+ if (n && (n->isQmlType()))
return static_cast<QmlTypeNode *>(n);
}
return nullptr;
@@ -1161,7 +1073,7 @@ QString Node::fullDocumentName() const
if (!n->name().isEmpty())
pieces.insert(0, n->name());
- if ((n->isQmlType() || n->isJsType()) && !n->logicalModuleName().isEmpty()) {
+ if (n->isQmlType() && !n->logicalModuleName().isEmpty()) {
pieces.insert(0, n->logicalModuleName());
break;
}
@@ -1178,7 +1090,7 @@ QString Node::fullDocumentName() const
// Create a name based on the type of the ancestor node.
QString concatenator = "::";
- if (n->isQmlType() || n->isJsType())
+ if (n->isQmlType())
concatenator = QLatin1Char('.');
if (n->isTextPageNode())
@@ -1542,7 +1454,7 @@ void Node::setDeprecatedSince(const QString &sinceVersion)
/*! \fn QString Node::qmlTypeName() const
If this is a QmlPropertyNode or a FunctionNode representing a QML
- or javascript methos, this function returns the qmlTypeName() of
+ method, this function returns the qmlTypeName() of
the parent() node. Otherwise it returns the name data member.
*/
@@ -1576,7 +1488,7 @@ void Node::setDeprecatedSince(const QString &sinceVersion)
version number is not absolutely necessary.
The strings are stored in the appropriate data members for use
- when the QML or javascript module page is generated.
+ when the QML module page is generated.
*/
/*! \fn void Node::setLogicalModuleInfo(const QStringList &info)
@@ -1588,7 +1500,7 @@ void Node::setDeprecatedSince(const QString &sinceVersion)
the minor version number is not strictly necessary.
The strings are stored in the appropriate data members for use
- when the QML or javascript module page is generated. This overload
+ when the QML module page is generated. This overload
of the function is called when qdoc is reading an index file.
*/
diff --git a/src/qdoc/node.h b/src/qdoc/node.h
index 8a786c9d7..13fc9e0c8 100644
--- a/src/qdoc/node.h
+++ b/src/qdoc/node.h
@@ -71,10 +71,6 @@ public:
QmlModule,
QmlProperty,
QmlValueType,
- JsType,
- JsModule,
- JsProperty,
- JsBasicType,
SharedComment,
Collection,
Proxy
@@ -127,7 +123,6 @@ public:
[[nodiscard]] NodeType nodeType() const { return m_nodeType; }
[[nodiscard]] QString nodeTypeString() const;
- bool changeType(NodeType from, NodeType to);
[[nodiscard]] Genus genus() const { return m_genus; }
void setGenus(Genus t) { m_genus = t; }
@@ -152,11 +147,6 @@ public:
[[nodiscard]] bool isGroup() const { return m_nodeType == Group; }
[[nodiscard]] bool isHeader() const { return m_nodeType == HeaderFile; }
[[nodiscard]] bool isIndexNode() const { return m_indexNodeFlag; }
- [[nodiscard]] bool isJsBasicType() const { return m_nodeType == JsBasicType; }
- [[nodiscard]] bool isJsModule() const { return m_nodeType == JsModule; }
- [[nodiscard]] bool isJsNode() const { return genus() == JS; }
- [[nodiscard]] bool isJsProperty() const { return m_nodeType == JsProperty; }
- [[nodiscard]] bool isJsType() const { return m_nodeType == JsType; }
[[nodiscard]] bool isModule() const { return m_nodeType == Module; }
[[nodiscard]] bool isNamespace() const { return m_nodeType == Namespace; }
[[nodiscard]] bool isPage() const { return m_nodeType == Page; }
diff --git a/src/qdoc/qdocdatabase.cpp b/src/qdoc/qdocdatabase.cpp
index 7b8644133..4f55e7753 100644
--- a/src/qdoc/qdocdatabase.cpp
+++ b/src/qdoc/qdocdatabase.cpp
@@ -464,8 +464,6 @@ void QDocDatabase::initializeDB()
s_typeNodeMap.insert("initialized", nullptr);
s_typeNodeMap.insert("isLoaded", nullptr);
s_typeNodeMap.insert("item", nullptr);
- s_typeNodeMap.insert("jsdict", nullptr);
- s_typeNodeMap.insert("jsobject", nullptr);
s_typeNodeMap.insert("key", nullptr);
s_typeNodeMap.insert("keysequence", nullptr);
s_typeNodeMap.insert("listViewClicked", nullptr);
@@ -570,12 +568,6 @@ void QDocDatabase::initializeDB()
QML module nodes in the primary tree.
*/
-/*!
- \fn const CNMap &QDocDatabase::jsModules()
- Returns a const reference to the collection of all
- JovaScript module nodes in the primary tree.
-*/
-
/*! \fn CollectionNode *QDocDatabase::findGroup(const QString &name)
Find the group node named \a name and return a pointer
to it. If a matching node is not found, add a new group
@@ -594,18 +586,6 @@ void QDocDatabase::initializeDB()
and the new module node is marked \e{not seen}.
*/
-/*! \fn CollectionNode *QDocDatabase::findQmlModule(const QString &name, bool javaScript)
- Find the QML module node named \a name and return a pointer
- to it. If a matching node is not found, add a new QML module
- node named \a name and return a pointer to that one.
-
- If \a javaScript is set, the return collection must be a
- JavaScript module.
-
- If a new QML or JavaScript module node is added, its parent
- is the tree root, and the new node is marked \e{not seen}.
- */
-
/*! \fn CollectionNode *QDocDatabase::addGroup(const QString &name)
Looks up the group named \a name in the primary tree. If
a match is found, a pointer to the node is returned.
@@ -630,14 +610,6 @@ void QDocDatabase::initializeDB()
node is returned.
*/
-/*! \fn CollectionNode *QDocDatabase::addJsModule(const QString &name)
- Looks up the JavaScript module named \a name in the primary
- tree. If a match is found, a pointer to the node is returned.
- Otherwise, a new JavaScript module node named \a name is
- created and inserted into the collection, and the pointer to
- that node is returned.
- */
-
/*! \fn CollectionNode *QDocDatabase::addToGroup(const QString &name, Node *node)
Looks up the group node named \a name in the collection
of all group nodes. If a match is not found, a new group
@@ -662,12 +634,6 @@ void QDocDatabase::initializeDB()
list. The parent of \a node is not changed by this function.
*/
-/*! \fn Collection *QDocDatabase::addToJsModule(const QString &name, Node *node)
- Looks up the JavaScript module named \a name. If it isn't there,
- create it. Then append \a node to the JavaScript module's member
- list. The parent of \a node is not changed by this function.
- */
-
/*!
Looks up the QML type node identified by the qualified Qml
type \a name and returns a pointer to the QML type node.
@@ -699,7 +665,7 @@ QmlTypeNode *QDocDatabase::findQmlType(const QString &qmid, const QString &name)
QStringList path(name);
Node *n = m_forest.findNodeByNameAndType(path, &Node::isQmlType);
- if (n && (n->isQmlType() || n->isJsType()))
+ if (n && n->isQmlType())
return static_cast<QmlTypeNode *>(n);
return nullptr;
}
@@ -1366,10 +1332,6 @@ const CollectionNode *QDocDatabase::getModuleNode(const Node *relative)
moduleType = Node::QmlModule;
moduleName = relative->logicalModuleName();
break;
- case Node::JS:
- moduleType = Node::JsModule;
- moduleName = relative->logicalModuleName();
- break;
default:
return nullptr;
}
@@ -1414,8 +1376,8 @@ void QDocDatabase::mergeCollections(Node::NodeType type, CNMap &cnm, const Node
if (values.size() > 1) {
for (CollectionNode *value : values) {
if (value != n) {
- // Allow multiple (major) versions of QML/JS modules
- if ((n->isQmlModule() || n->isJsModule())
+ // Allow multiple (major) versions of QML modules
+ if ((n->isQmlModule())
&& n->logicalModuleIdentifier() != value->logicalModuleIdentifier()) {
if (value->wasSeen() && value != relative
&& !value->members().isEmpty())
@@ -1441,7 +1403,7 @@ void QDocDatabase::mergeCollections(Node::NodeType type, CNMap &cnm, const Node
and type as \a c and merges their members into the
members list of \a c.
- For QML and JS modules, only nodes with matching
+ For QML modules, only nodes with matching
module identifiers are merged to avoid merging
modules with different (major) versions.
*/
@@ -1492,7 +1454,7 @@ void QDocDatabase::mergeCollections(CollectionNode *c)
for (auto *tree : searchOrder()) {
CollectionNode *cn = tree->getCollection(c->name(), c->nodeType());
if (cn && cn != c) {
- if ((cn->isQmlModule() || cn->isJsModule())
+ if ((cn->isQmlModule())
&& cn->logicalModuleIdentifier() != c->logicalModuleIdentifier())
continue;
diff --git a/src/qdoc/qdocdatabase.h b/src/qdoc/qdocdatabase.h
index 5f4a84420..efa2ce228 100644
--- a/src/qdoc/qdocdatabase.h
+++ b/src/qdoc/qdocdatabase.h
@@ -184,12 +184,10 @@ public:
const CNMap &groups() { return primaryTree()->groups(); }
const CNMap &modules() { return primaryTree()->modules(); }
const CNMap &qmlModules() { return primaryTree()->qmlModules(); }
- const CNMap &jsModules() { return primaryTree()->jsModules(); }
CollectionNode *addGroup(const QString &name) { return primaryTree()->addGroup(name); }
CollectionNode *addModule(const QString &name) { return primaryTree()->addModule(name); }
CollectionNode *addQmlModule(const QString &name) { return primaryTree()->addQmlModule(name); }
- CollectionNode *addJsModule(const QString &name) { return primaryTree()->addJsModule(name); }
CollectionNode *addToGroup(const QString &name, Node *node)
{
@@ -203,10 +201,6 @@ public:
{
return primaryTree()->addToQmlModule(name, node);
}
- CollectionNode *addToJsModule(const QString &name, Node *node)
- {
- return primaryTree()->addToJsModule(name, node);
- }
void addExampleNode(ExampleNode *n) { primaryTree()->addExampleNode(n); }
ExampleNodeMap &exampleNodeMap() { return primaryTree()->exampleNodeMap(); }
diff --git a/src/qdoc/qdocindexfiles.cpp b/src/qdoc/qdocindexfiles.cpp
index cca624db8..85c4f2724 100644
--- a/src/qdoc/qdocindexfiles.cpp
+++ b/src/qdoc/qdocindexfiles.cpp
@@ -267,28 +267,6 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader &reader, Node *current,
else if (!indexUrl.isNull())
location = Location(name);
node = qmlTypeNode;
- } else if (elementName == QLatin1String("jstype")) {
- auto *qmlTypeNode = new QmlTypeNode(parent, name);
- qmlTypeNode->setGenus(Node::JS);
- qmlTypeNode->setTitle(attributes.value(QLatin1String("title")).toString());
- QString logicalModuleName = attributes.value(QLatin1String("js-module-name")).toString();
- if (!logicalModuleName.isEmpty())
- m_qdb->addToQmlModule(logicalModuleName, qmlTypeNode);
- bool abstract = false;
- if (attributes.value(QLatin1String("abstract")) == QLatin1String("true"))
- abstract = true;
- qmlTypeNode->setAbstract(abstract);
- QString qmlFullBaseName = attributes.value(QLatin1String("js-base-type")).toString();
- if (!qmlFullBaseName.isEmpty()) {
- qmlTypeNode->setQmlBaseName(qmlFullBaseName);
- }
- if (attributes.hasAttribute(QLatin1String("location")))
- name = attributes.value("location").toString();
- if (!indexUrl.isEmpty())
- location = Location(indexUrl + QLatin1Char('/') + name);
- else if (!indexUrl.isNull())
- location = Location(name);
- node = qmlTypeNode;
} else if (elementName == QLatin1String("qmlvaluetype")
|| elementName == QLatin1String("qmlbasictype")) {
auto *qbtn = new QmlValueTypeNode(parent, name);
@@ -300,17 +278,6 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader &reader, Node *current,
else if (!indexUrl.isNull())
location = Location(name);
node = qbtn;
- } else if (elementName == QLatin1String("jsbasictype")) {
- auto *qbtn = new QmlValueTypeNode(parent, name);
- qbtn->setGenus(Node::JS);
- qbtn->setTitle(attributes.value(QLatin1String("title")).toString());
- if (attributes.hasAttribute(QLatin1String("location")))
- name = attributes.value("location").toString();
- if (!indexUrl.isEmpty())
- location = Location(indexUrl + QLatin1Char('/') + name);
- else if (!indexUrl.isNull())
- location = Location(name);
- node = qbtn;
} else if (elementName == QLatin1String("qmlproperty")) {
QString type = attributes.value(QLatin1String("type")).toString();
bool attached = false;
@@ -324,18 +291,6 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader &reader, Node *current,
if (attributes.value(QLatin1String("required")) == QLatin1String("true"))
qmlPropertyNode->setRequired();
node = qmlPropertyNode;
- } else if (elementName == QLatin1String("jsproperty")) {
- QString type = attributes.value(QLatin1String("type")).toString();
- bool attached = false;
- if (attributes.value(QLatin1String("attached")) == QLatin1String("true"))
- attached = true;
- bool readonly = false;
- if (attributes.value(QLatin1String("writable")) == QLatin1String("false"))
- readonly = true;
- auto *qmlPropertyNode = new QmlPropertyNode(parent, name, type, attached);
- qmlPropertyNode->setGenus(Node::JS);
- qmlPropertyNode->markReadOnly(readonly);
- node = qmlPropertyNode;
} else if (elementName == QLatin1String("group")) {
auto *collectionNode = m_qdb->addGroup(name);
collectionNode->setTitle(attributes.value(QLatin1String("title")).toString());
@@ -361,17 +316,6 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader &reader, Node *current,
if (attributes.value(QLatin1String("seen")) == QLatin1String("true"))
collectionNode->markSeen();
node = collectionNode;
- } else if (elementName == QLatin1String("jsmodule")) {
- QString t = attributes.value(QLatin1String("js-module-name")).toString();
- auto *collectionNode = m_qdb->addJsModule(t);
- QStringList info;
- info << t << attributes.value(QLatin1String("js-module-version")).toString();
- collectionNode->setLogicalModuleInfo(info);
- collectionNode->setTitle(attributes.value(QLatin1String("title")).toString());
- collectionNode->setSubtitle(attributes.value(QLatin1String("subtitle")).toString());
- if (attributes.value(QLatin1String("seen")) == QLatin1String("true"))
- collectionNode->markSeen();
- node = collectionNode;
} else if (elementName == QLatin1String("page")) {
QDocAttr subtype = QDocAttrNone;
Node::PageType ptype = Node::NoPageType;
@@ -857,21 +801,9 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
moduleVerAttr = "qml-module-version";
qmlFullBaseName = node->qmlFullBaseName();
break;
- case Node::JsType:
- nodeName = "jstype";
- baseNameAttr = "js-base-type";
- moduleNameAttr = "js-module-name";
- moduleVerAttr = "js-module-version";
- if (node->logicalModule() != nullptr)
- logicalModuleName = node->logicalModule()->logicalModuleName();
- qmlFullBaseName = node->qmlFullBaseName();
- break;
case Node::QmlValueType:
nodeName = "qmlvaluetype";
break;
- case Node::JsBasicType:
- nodeName = "jsbasictype";
- break;
case Node::Page:
case Node::Example:
case Node::ExternalPage:
@@ -890,13 +822,6 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
logicalModuleName = node->logicalModuleName();
logicalModuleVersion = node->logicalModuleVersion();
break;
- case Node::JsModule:
- nodeName = "jsmodule";
- moduleNameAttr = "js-module-name";
- moduleVerAttr = "js-module-version";
- logicalModuleName = node->logicalModuleName();
- logicalModuleVersion = node->logicalModuleVersion();
- break;
case Node::Enum:
nodeName = "enum";
break;
@@ -914,14 +839,11 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
if (!node->isPropertyGroup())
return false;
// Add an entry for property groups so that they can be linked to
- nodeName = node->genus() == Node::QML ? "qmlproperty" : "jsproperty";
+ nodeName = "qmlproperty";
break;
case Node::QmlProperty:
nodeName = "qmlproperty";
break;
- case Node::JsProperty:
- nodeName = "jsproperty";
- break;
case Node::Proxy:
nodeName = "proxy";
break;
@@ -944,7 +866,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
writer.writeAttribute("name", objName);
- // Write module and base type info for QML/JS types
+ // Write module and base type info for QML types
if (!moduleNameAttr.isEmpty()) {
if (!logicalModuleName.isEmpty())
writer.writeAttribute(moduleNameAttr, logicalModuleName);
@@ -964,9 +886,9 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
href = m_gen->fullDocumentLocation(node);
} else
href = node->name();
- if (node->isQmlNode() || node->isJsNode()) {
+ if (node->isQmlNode()) {
Aggregate *p = node->parent();
- if (p && (p->isQmlType() || p->isJsType()) && p->isAbstract())
+ if (p && p->isQmlType() && p->isAbstract())
href.clear();
}
if (!href.isEmpty())
@@ -1042,7 +964,6 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
if (!brief.isEmpty())
writer.writeAttribute("brief", brief);
} break;
- case Node::JsType:
case Node::QmlType: {
const auto *qmlTypeNode = static_cast<const QmlTypeNode *>(node);
writer.writeAttribute("title", qmlTypeNode->title());
@@ -1081,7 +1002,6 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
} break;
case Node::Group:
case Node::Module:
- case Node::JsModule:
case Node::QmlModule: {
const auto *collectionNode = static_cast<const CollectionNode *>(node);
writer.writeAttribute("seen", collectionNode->wasSeen() ? "true" : "false");
@@ -1093,7 +1013,6 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node,
if (!brief.isEmpty())
writer.writeAttribute("brief", brief);
} break;
- case Node::JsProperty:
case Node::QmlProperty: {
auto *qmlPropertyNode = static_cast<QmlPropertyNode *>(node);
writer.writeAttribute("type", qmlPropertyNode->dataType());
@@ -1414,8 +1333,7 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter &writer, Node *node,
Note that groups, modules, and QML modules are written
after all the other nodes.
*/
- if (node->isCollectionNode() || node->isGroup() || node->isModule() || node->isQmlModule()
- || node->isJsModule())
+ if (node->isCollectionNode() || node->isGroup() || node->isModule() || node->isQmlModule())
return;
if (node->isInternal() && !Config::instance().showInternal())
@@ -1463,14 +1381,6 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter &writer, Node *node,
writer.writeEndElement();
}
}
-
- const CNMap &jsModules = m_qdb->jsModules();
- if (!jsModules.isEmpty()) {
- for (auto it = jsModules.constBegin(); it != jsModules.constEnd(); ++it) {
- if (generateIndexSection(writer, it.value(), post))
- writer.writeEndElement();
- }
- }
}
writer.writeEndElement();
diff --git a/src/qdoc/qmlcodemarker.cpp b/src/qdoc/qmlcodemarker.cpp
index 9e2737604..1475d2083 100644
--- a/src/qdoc/qmlcodemarker.cpp
+++ b/src/qdoc/qmlcodemarker.cpp
@@ -80,7 +80,7 @@ QString QmlCodeMarker::markedUpCode(const QString &code, const Node *relative,
/*!
Constructs and returns the marked up name for the \a node.
- If the node is any kind of QML or JS function (a method,
+ If the node is any kind of QML function (a method,
signal, or handler), "()" is appended to the marked up name.
*/
QString QmlCodeMarker::markedUpName(const Node *node)
diff --git a/src/qdoc/qmlcodeparser.cpp b/src/qdoc/qmlcodeparser.cpp
index ac3fbb164..0bf9b8486 100644
--- a/src/qdoc/qmlcodeparser.cpp
+++ b/src/qdoc/qmlcodeparser.cpp
@@ -127,11 +127,7 @@ const QSet<QString> &QmlCodeParser::topicCommands()
<< COMMAND_QMLPROPERTY << COMMAND_QMLPROPERTYGROUP // mws 13/03/2019
<< COMMAND_QMLATTACHEDPROPERTY << COMMAND_QMLSIGNAL
<< COMMAND_QMLATTACHEDSIGNAL << COMMAND_QMLMETHOD
- << COMMAND_QMLATTACHEDMETHOD << COMMAND_QMLVALUETYPE << COMMAND_QMLBASICTYPE
- << COMMAND_JSTYPE
- << COMMAND_JSPROPERTY << COMMAND_JSPROPERTYGROUP // mws 13/03/2019
- << COMMAND_JSATTACHEDPROPERTY << COMMAND_JSSIGNAL << COMMAND_JSATTACHEDSIGNAL
- << COMMAND_JSMETHOD << COMMAND_JSATTACHEDMETHOD << COMMAND_JSBASICTYPE;
+ << COMMAND_QMLATTACHEDMETHOD << COMMAND_QMLVALUETYPE << COMMAND_QMLBASICTYPE;
}
return topicCommands_;
}
diff --git a/src/qdoc/qmlpropertynode.cpp b/src/qdoc/qmlpropertynode.cpp
index ef660b1b0..034dedf25 100644
--- a/src/qdoc/qmlpropertynode.cpp
+++ b/src/qdoc/qmlpropertynode.cpp
@@ -17,7 +17,7 @@ QT_BEGIN_NAMESPACE
*/
QmlPropertyNode::QmlPropertyNode(Aggregate *parent, const QString &name, QString type,
bool attached)
- : Node(parent->isJsType() ? JsProperty : QmlProperty, parent, name),
+ : Node(QmlProperty, parent, name),
m_type(std::move(type)),
m_attached(attached)
{
@@ -80,7 +80,7 @@ PropertyNode *QmlPropertyNode::findCorrespondingCppProperty()
{
PropertyNode *pn;
Node *n = parent();
- while (n && !(n->isQmlType() || n->isJsType()))
+ while (n && !(n->isQmlType()))
n = n->parent();
if (n) {
auto *qcn = static_cast<QmlTypeNode *>(n);
diff --git a/src/qdoc/qmltypenode.cpp b/src/qdoc/qmltypenode.cpp
index c8f41451a..10de62307 100644
--- a/src/qdoc/qmltypenode.cpp
+++ b/src/qdoc/qmltypenode.cpp
@@ -12,13 +12,12 @@ QT_BEGIN_NAMESPACE
QMultiMap<const Node *, Node *> QmlTypeNode::s_inheritedBy;
/*!
- Constructs a Qml type node or a Js type node depending on
- the value of \a type, which is Node::QmlType by default,
- but which can also be Node::JsType. The new node has the
- given \a parent and \a name.
+ Constructs a Qml type.
+
+ The new node has the given \a parent and \a name.
*/
-QmlTypeNode::QmlTypeNode(Aggregate *parent, const QString &name, NodeType type)
- : Aggregate(type, parent, name)
+QmlTypeNode::QmlTypeNode(Aggregate *parent, const QString &name)
+ : Aggregate(QmlType, parent, name)
{
setTitle(name);
}
@@ -150,13 +149,12 @@ void QmlTypeNode::resolveInheritance(NodeMap &previousSearches)
}
/*!
- Constructs either a Qml basic type node or a Javascript
- basic type node, depending on the value pf \a type, which
- must be either Node::QmlBasicType or Node::JsBasicType.
+ Constructs a Qml basic type node.
+
The new node has the given \a parent and \a name.
*/
-QmlValueTypeNode::QmlValueTypeNode(Aggregate *parent, const QString &name, Node::NodeType type)
- : Aggregate(type, parent, name)
+QmlValueTypeNode::QmlValueTypeNode(Aggregate *parent, const QString &name)
+ : Aggregate(QmlValueType, parent, name)
{
setTitle(name);
}
diff --git a/src/qdoc/qmltypenode.h b/src/qdoc/qmltypenode.h
index b9c35c017..d79e2e619 100644
--- a/src/qdoc/qmltypenode.h
+++ b/src/qdoc/qmltypenode.h
@@ -21,7 +21,7 @@ typedef QList<ImportRec> ImportList;
class QmlTypeNode : public Aggregate
{
public:
- QmlTypeNode(Aggregate *parent, const QString &name, NodeType type = QmlType);
+ QmlTypeNode(Aggregate *parent, const QString &name);
[[nodiscard]] bool isFirstClassAggregate() const override { return true; }
[[nodiscard]] bool isQtQuickNode() const override
{
@@ -70,7 +70,7 @@ private:
class QmlValueTypeNode : public Aggregate
{
public:
- QmlValueTypeNode(Aggregate *parent, const QString &name, NodeType type = QmlValueType);
+ QmlValueTypeNode(Aggregate *parent, const QString &name);
[[nodiscard]] bool isFirstClassAggregate() const override { return true; }
};
diff --git a/src/qdoc/qmlvisitor.cpp b/src/qdoc/qmlvisitor.cpp
index 28e125a4e..bf0cefadc 100644
--- a/src/qdoc/qmlvisitor.cpp
+++ b/src/qdoc/qmlvisitor.cpp
@@ -124,13 +124,10 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::SourceLocation location, Node *no
if (!topicsUsed.empty()) {
for (int i = 0; i < topicsUsed.size(); ++i) {
QString topic = topicsUsed.at(i).m_topic;
- if (!topic.startsWith(QLatin1String("qml"))
- && !topic.startsWith(QLatin1String("js")))
+ if (!topic.startsWith(QLatin1String("qml")))
continue; // maybe a qdoc warning here? mws 18/07/18
QString args = topicsUsed.at(i).m_args;
- if (topic == COMMAND_JSTYPE) {
- node->changeType(Node::QmlType, Node::JsType);
- } else if (topic.endsWith(QLatin1String("property"))) {
+ if (topic.endsWith(QLatin1String("property"))) {
QmlPropArgs qpa;
if (splitQmlPropertyArg(doc, args, qpa)) {
if (qpa.m_name == nodePassedIn->name()) {
@@ -148,19 +145,14 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::SourceLocation location, Node *no
n->markDefault();
if (isAttached)
n->markReadOnly(0);
- if ((topic == COMMAND_JSPROPERTY)
- || (topic == COMMAND_JSATTACHEDPROPERTY))
- n->changeType(Node::QmlProperty, Node::JsProperty);
nodes.append(n);
}
} else
- qDebug() << " FAILED TO PARSE QML OR JS PROPERTY:" << topic << args;
+ qDebug() << " FAILED TO PARSE QML PROPERTY:" << topic << args;
} else if (topic.endsWith(QLatin1String("method")) || topic == COMMAND_QMLSIGNAL) {
if (node->isFunction()) {
auto *fn = static_cast<FunctionNode *>(node);
QmlSignatureParser qsp(fn, args, doc.location());
- if (topic == COMMAND_JSMETHOD || topic == COMMAND_JSATTACHEDMETHOD)
- fn->changeMetaness(FunctionNode::QmlMethod, FunctionNode::JsMethod);
}
}
}
@@ -394,20 +386,20 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::SourceLocation, Node *node, Doc &d
for (const auto &command : qAsConst(metacommands)) {
const ArgList args = doc.metaCommandArgs(command);
if ((command == COMMAND_QMLABSTRACT) || (command == COMMAND_ABSTRACT)) {
- if (node->isQmlType() || node->isJsType()) {
+ if (node->isQmlType()) {
node->setAbstract(true);
}
} else if (command == COMMAND_DEPRECATED) {
node->setStatus(Node::Deprecated);
if (!args[0].second.isEmpty())
node->setDeprecatedSince(args[0].second);
- } else if ((command == COMMAND_INQMLMODULE) || (command == COMMAND_INJSMODULE)) {
+ } else if (command == COMMAND_INQMLMODULE) {
qdb->addToQmlModule(args[0].first, node);
} else if (command == COMMAND_QMLINHERITS) {
if (node->name() == args[0].first)
doc.location().warning(
QStringLiteral("%1 tries to inherit itself").arg(args[0].first));
- else if (node->isQmlType() || node->isJsType()) {
+ else if (node->isQmlType()) {
auto *qmlType = static_cast<QmlTypeNode *>(node);
qmlType->setQmlBaseName(args[0].first);
}
@@ -475,9 +467,7 @@ QString QmlDocVisitor::getFullyQualifiedId(QQmlJS::AST::UiQualifiedId *id)
is level 1.
Note that this visit() function creates the qdoc object node as a
- QmlType. If it is actually a JsType, this fact is discovered when
- the qdoc comment is applied to the node. The node's typet is then
- changed to JsType.
+ QmlType.
*/
bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition)
{
@@ -592,12 +582,10 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiPublicMember *member)
}
switch (member->type) {
case QQmlJS::AST::UiPublicMember::Signal: {
- if (m_current->isQmlType() || m_current->isJsType()) {
+ if (m_current->isQmlType()) {
auto *qmlType = static_cast<QmlTypeNode *>(m_current);
if (qmlType) {
FunctionNode::Metaness metaness = FunctionNode::QmlSignal;
- if (qmlType->isJsType())
- metaness = FunctionNode::JsSignal;
QString name = member->name.toString();
auto *newSignal = new FunctionNode(metaness, m_current, name);
Parameters &parameters = newSignal->parameters();
@@ -613,7 +601,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiPublicMember *member)
}
case QQmlJS::AST::UiPublicMember::Property: {
QString type = qualifiedIdToString(member->memberType);
- if (m_current->isQmlType() || m_current->isJsType()) {
+ if (m_current->isQmlType()) {
auto *qmlType = static_cast<QmlTypeNode *>(m_current);
if (qmlType) {
QString name = member->name.toString();
@@ -658,9 +646,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::FunctionDeclaration *fd)
{
if (m_nestingLevel <= 1) {
FunctionNode::Metaness metaness = FunctionNode::QmlMethod;
- if (m_current->isJsType())
- metaness = FunctionNode::JsMethod;
- else if (!m_current->isQmlType())
+ if (!m_current->isQmlType())
return true;
QString name = fd->name.toString();
auto *method = new FunctionNode(metaness, m_current, name);
diff --git a/src/qdoc/sections.cpp b/src/qdoc/sections.cpp
index 7048be058..3729d74ce 100644
--- a/src/qdoc/sections.cpp
+++ b/src/qdoc/sections.cpp
@@ -120,9 +120,6 @@ QString Section::sortName(const Node *node, const QString *name)
}
if (fn->isQmlMethod() || fn->isQmlSignal() || fn->isQmlSignalHandler())
return QLatin1Char('E') + nodeName;
-
- if (fn->isJsMethod() || fn->isJsSignal() || fn->isJsSignalHandler())
- return QLatin1Char('E') + nodeName;
}
if (node->isClassNode())
return QLatin1Char('A') + nodeName;
@@ -144,7 +141,7 @@ void Section::insert(Node *node)
if (!node->isRelatedNonmember()) {
Aggregate *p = node->parent();
if (!p->isNamespace() && p != m_aggregate) {
- if ((!p->isQmlType() && !p->isJsType()) || !p->isAbstract())
+ if (!p->isQmlType() || !p->isAbstract())
inherited = true;
}
}
@@ -283,8 +280,6 @@ Sections::Sections(Aggregate *aggregate) : m_aggregate(aggregate)
initAggregate(s_stdCppClassDetailsSections, m_aggregate);
buildStdCppClassRefPageSections();
break;
- case Node::JsType:
- case Node::JsBasicType:
case Node::QmlType:
case Node::QmlValueType:
initAggregate(s_stdQmlTypeSummarySections, m_aggregate);
@@ -315,7 +310,6 @@ Sections::Sections(const NodeMultiMap &nsmap) : m_aggregate(nullptr)
for (auto it = nsmap.constBegin(); it != nsmap.constEnd(); ++it) {
Node *node = it.value();
switch (node->nodeType()) {
- case Node::JsType:
case Node::QmlType:
sections[SinceQmlTypes].appendMember(node);
break;
@@ -339,15 +333,12 @@ Sections::Sections(const NodeMultiMap &nsmap) : m_aggregate(nullptr)
case Node::Function: {
const auto *fn = static_cast<const FunctionNode *>(node);
switch (fn->metaness()) {
- case FunctionNode::JsSignal:
case FunctionNode::QmlSignal:
sections[SinceQmlSignals].appendMember(node);
break;
- case FunctionNode::JsSignalHandler:
case FunctionNode::QmlSignalHandler:
sections[SinceQmlSignalHandlers].appendMember(node);
break;
- case FunctionNode::JsMethod:
case FunctionNode::QmlMethod:
sections[SinceQmlMethods].appendMember(node);
break;
@@ -379,7 +370,6 @@ Sections::Sections(const NodeMultiMap &nsmap) : m_aggregate(nullptr)
case Node::Variable:
sections[SinceVariables].appendMember(node);
break;
- case Node::JsProperty:
case Node::QmlProperty:
sections[SinceQmlProperties].appendMember(node);
break;
@@ -406,8 +396,6 @@ Sections::~Sections()
clear(stdCppClassDetailsSections());
allMembersSection().clear();
break;
- case Node::JsType:
- case Node::JsBasicType:
case Node::QmlType:
case Node::QmlValueType:
clear(stdQmlTypeSummarySections());
@@ -828,7 +816,7 @@ void Sections::distributeQmlNodeInDetailsVector(SectionVector &dv, Node *n)
t = scn->collective().first(); // TODO: warn about mixed node types in collective?
}
- if (t->isQmlProperty() || t->isJsProperty()) {
+ if (t->isQmlProperty()) {
auto *pn = static_cast<QmlPropertyNode *>(t);
if (pn->isAttached())
dv[QmlAttachedProperties].insert(n);
@@ -836,14 +824,14 @@ void Sections::distributeQmlNodeInDetailsVector(SectionVector &dv, Node *n)
dv[QmlProperties].insert(n);
} else if (t->isFunction()) {
auto *fn = static_cast<FunctionNode *>(t);
- if (fn->isQmlSignal() || fn->isJsSignal()) {
+ if (fn->isQmlSignal()) {
if (fn->isAttached())
dv[QmlAttachedSignals].insert(n);
else
dv[QmlSignals].insert(n);
- } else if (fn->isQmlSignalHandler() || fn->isJsSignalHandler()) {
+ } else if (fn->isQmlSignalHandler()) {
dv[QmlSignalHandlers].insert(n);
- } else if (fn->isQmlMethod() || fn->isJsMethod()) {
+ } else if (fn->isQmlMethod()) {
if (fn->isAttached())
dv[QmlAttachedMethods].insert(n);
else
@@ -861,7 +849,7 @@ void Sections::distributeQmlNodeInSummaryVector(SectionVector &sv, Node *n, bool
{
if (n->isSharingComment() && !sharing)
return;
- if (n->isQmlProperty() || n->isJsProperty()) {
+ if (n->isQmlProperty()) {
auto *pn = static_cast<QmlPropertyNode *>(n);
if (pn->isAttached())
sv[QmlAttachedProperties].insert(pn);
@@ -869,14 +857,14 @@ void Sections::distributeQmlNodeInSummaryVector(SectionVector &sv, Node *n, bool
sv[QmlProperties].insert(pn);
} else if (n->isFunction()) {
auto *fn = static_cast<FunctionNode *>(n);
- if (fn->isQmlSignal() || fn->isJsSignal()) {
+ if (fn->isQmlSignal()) {
if (fn->isAttached())
sv[QmlAttachedSignals].insert(fn);
else
sv[QmlSignals].insert(fn);
- } else if (fn->isQmlSignalHandler() || fn->isJsSignalHandler()) {
+ } else if (fn->isQmlSignalHandler()) {
sv[QmlSignalHandlers].insert(fn);
- } else if (fn->isQmlMethod() || fn->isJsMethod()) {
+ } else if (fn->isQmlMethod()) {
if (fn->isAttached())
sv[QmlAttachedMethods].insert(fn);
else
diff --git a/src/qdoc/sharedcommentnode.h b/src/qdoc/sharedcommentnode.h
index eff0f6d2c..d319d7c59 100644
--- a/src/qdoc/sharedcommentnode.h
+++ b/src/qdoc/sharedcommentnode.h
@@ -27,8 +27,7 @@ public:
[[nodiscard]] bool isPropertyGroup() const override
{
- return !name().isEmpty() && !m_collective.isEmpty()
- && (m_collective.at(0)->isQmlProperty() || m_collective.at(0)->isJsProperty());
+ return !name().isEmpty() && !m_collective.isEmpty() && (m_collective.at(0)->isQmlProperty());
}
[[nodiscard]] qsizetype count() const { return m_collective.size(); }
void append(Node *node)
diff --git a/src/qdoc/tagfilewriter.cpp b/src/qdoc/tagfilewriter.cpp
index b8265ec1c..bef0c693d 100644
--- a/src/qdoc/tagfilewriter.cpp
+++ b/src/qdoc/tagfilewriter.cpp
@@ -50,7 +50,6 @@ void TagFileWriter::generateTagFileCompounds(QXmlStreamWriter &writer, const Agg
case Node::Struct:
case Node::Union:
case Node::QmlType:
- case Node::JsType:
kind = "class";
break;
default:
diff --git a/src/qdoc/tree.cpp b/src/qdoc/tree.cpp
index ee0dc5e01..bccece9f9 100644
--- a/src/qdoc/tree.cpp
+++ b/src/qdoc/tree.cpp
@@ -281,7 +281,7 @@ void Tree::resolveCppToQmlLinks()
const NodeList &children = m_root.childNodes();
for (auto *child : children) {
- if (child->isQmlType() || child->isJsType()) {
+ if (child->isQmlType()) {
auto *qcn = static_cast<QmlTypeNode *>(child);
auto *cn = const_cast<ClassNode *>(qcn->classNode());
if (cn)
@@ -917,8 +917,6 @@ CNMap *Tree::getCollectionMap(Node::NodeType type)
return &m_modules;
case Node::QmlModule:
return &m_qmlModules;
- case Node::JsModule:
- return &m_jsModules;
default:
break;
}
@@ -943,12 +941,11 @@ CollectionNode *Tree::getCollection(const QString &name, Node::NodeType type)
}
/*!
- Find the group, module, QML module, or JavaScript module
- named \a name and return a pointer to that collection node.
- \a type specifies which kind of collection node you want.
- If a collection node with the specified \a name and \a type
- is not found, a new one is created, and the pointer to the
- new one is returned.
+ Find the group, module, or QML module named \a name and return a
+ pointer to that collection node. \a type specifies which kind of
+ collection node you want. If a collection node with the specified \a
+ name and \a type is not found, a new one is created, and the pointer
+ to the new one is returned.
If a new collection node is created, its parent is the tree
root, and the new collection node is marked \e{not seen}.
@@ -998,15 +995,6 @@ CollectionNode *Tree::findCollection(const QString &name, Node::NodeType type)
and the new node is marked \e{not seen}.
*/
-/*! \fn CollectionNode *Tree::findJsModule(const QString &name)
- Find the JavaScript module named \a name and return a pointer
- to it. If a matching node is not found, add a new JavaScript
- module node named \a name and return a pointer to that one.
-
- If a new JavaScript module node is added, its parent is the
- tree root, and the new node is marked \e{not seen}.
- */
-
/*! \fn CollectionNode *Tree::addGroup(const QString &name)
Looks up the group node named \a name in the collection
of all group nodes. If a match is found, a pointer to the
@@ -1031,14 +1019,6 @@ CollectionNode *Tree::findCollection(const QString &name, Node::NodeType type)
to that node is returned.
*/
-/*! \fn CollectionNode *Tree::addJsModule(const QString &name)
- Looks up the JavaScript module node named \a name in the collection
- of all JavaScript module nodes. If a match is found, a pointer to the
- node is returned. Otherwise, a new JavaScrpt module node named \a name
- is created and inserted into the collection, and the pointer
- to that node is returned.
- */
-
/*!
Looks up the group node named \a name in the collection
of all group nodes. If a match is not found, a new group
@@ -1105,37 +1085,6 @@ CollectionNode *Tree::addToQmlModule(const QString &name, Node *node)
}
/*!
- Looks up the QML module named \a name. If it isn't there,
- create it. Then append \a node to the QML module's member
- list. The parent of \a node is not changed by this function.
- Returns the pointer to the QML module node.
- */
-CollectionNode *Tree::addToJsModule(const QString &name, Node *node)
-{
- QStringList qmid;
- QStringList dotSplit;
- QStringList blankSplit = name.split(QLatin1Char(' '));
- qmid.append(blankSplit[0]);
- if (blankSplit.size() > 1) {
- qmid.append(blankSplit[0] + blankSplit[1]);
- dotSplit = blankSplit[1].split(QLatin1Char('.'));
- qmid.append(blankSplit[0] + dotSplit[0]);
- }
-
- CollectionNode *cn = findJsModule(blankSplit[0]);
- cn->addMember(node);
- node->setQmlModule(cn);
- if (node->isJsType()) {
- QmlTypeNode *n = static_cast<QmlTypeNode *>(node);
- for (int i = 0; i < qmid.size(); ++i) {
- QString key = qmid[i] + "::" + node->name();
- insertQmlType(key, n);
- }
- }
- return cn;
-}
-
-/*!
If the QML type map does not contain \a key, insert node
\a n with the specified \a key.
*/
@@ -1166,7 +1115,7 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path, const Parame
if (qcn == nullptr) {
QStringList p(path[1]);
Node *n = findNodeByNameAndType(p, &Node::isQmlType);
- if ((n != nullptr) && (n->isQmlType() || n->isJsType()))
+ if ((n != nullptr) && n->isQmlType())
qcn = static_cast<QmlTypeNode *>(n);
}
if (qcn != nullptr)
diff --git a/src/qdoc/tree.h b/src/qdoc/tree.h
index 31632246c..7e1b9a131 100644
--- a/src/qdoc/tree.h
+++ b/src/qdoc/tree.h
@@ -121,7 +121,6 @@ private: // The rest of the class is private.
[[nodiscard]] const CNMap &groups() const { return m_groups; }
[[nodiscard]] const CNMap &modules() const { return m_modules; }
[[nodiscard]] const CNMap &qmlModules() const { return m_qmlModules; }
- [[nodiscard]] const CNMap &jsModules() const { return m_jsModules; }
CollectionNode *getCollection(const QString &name, Node::NodeType type);
CollectionNode *findCollection(const QString &name, Node::NodeType type);
@@ -132,20 +131,14 @@ private: // The rest of the class is private.
{
return findCollection(name, Node::QmlModule);
}
- CollectionNode *findJsModule(const QString &name)
- {
- return findCollection(name, Node::JsModule);
- }
CollectionNode *addGroup(const QString &name) { return findGroup(name); }
CollectionNode *addModule(const QString &name) { return findModule(name); }
CollectionNode *addQmlModule(const QString &name) { return findQmlModule(name); }
- CollectionNode *addJsModule(const QString &name) { return findJsModule(name); }
CollectionNode *addToGroup(const QString &name, Node *node);
CollectionNode *addToModule(const QString &name, Node *node);
CollectionNode *addToQmlModule(const QString &name, Node *node);
- CollectionNode *addToJsModule(const QString &name, Node *node);
[[nodiscard]] QmlTypeNode *lookupQmlType(const QString &name) const
{
@@ -180,7 +173,6 @@ private:
CNMap m_groups {};
CNMap m_modules {};
CNMap m_qmlModules {};
- CNMap m_jsModules {};
QmlTypeMap m_qmlTypeMap {};
ExampleNodeMap m_exampleNodeMap {};
NodeList m_proxies {};
diff --git a/src/qdoc/xmlgenerator.cpp b/src/qdoc/xmlgenerator.cpp
index 2ed23d549..5df638b97 100644
--- a/src/qdoc/xmlgenerator.cpp
+++ b/src/qdoc/xmlgenerator.cpp
@@ -17,12 +17,11 @@ const QRegularExpression XmlGenerator::m_funcLeftParen(QStringLiteral("^\\S+(\\(
XmlGenerator::XmlGenerator(FileResolver& file_resolver) : Generator(file_resolver) {}
/*!
- Do not display \brief for QML/JS types, document and collection nodes
+ Do not display \brief for QML types, document and collection nodes
*/
bool XmlGenerator::hasBrief(const Node *node)
{
- return !(node->isQmlType() || node->isPageNode() || node->isCollectionNode()
- || node->isJsType());
+ return !(node->isQmlType() || node->isPageNode() || node->isCollectionNode());
}
/*!
@@ -100,8 +99,6 @@ Node::NodeType XmlGenerator::typeFromString(const Atom *atom)
const auto &name = atom->string();
if (name.startsWith(QLatin1String("qml")))
return Node::QmlModule;
- else if (name.startsWith(QLatin1String("js")))
- return Node::JsModule;
else if (name.startsWith(QLatin1String("groups")))
return Node::Group;
else
@@ -249,15 +246,12 @@ QString XmlGenerator::refForNode(const Node *node)
case Node::Function: {
const auto fn = static_cast<const FunctionNode *>(node);
switch (fn->metaness()) {
- case FunctionNode::JsSignal:
case FunctionNode::QmlSignal:
ref = fn->name() + "-signal";
break;
- case FunctionNode::JsSignalHandler:
case FunctionNode::QmlSignalHandler:
ref = fn->name() + "-signal-handler";
break;
- case FunctionNode::JsMethod:
case FunctionNode::QmlMethod:
ref = fn->name() + "-method";
if (fn->overloadNumber() != 0)
@@ -278,7 +272,6 @@ QString XmlGenerator::refForNode(const Node *node)
if (!node->isPropertyGroup())
break;
} Q_FALLTHROUGH();
- case Node::JsProperty:
case Node::QmlProperty:
if (node->isAttached())
ref = node->name() + "-attached-prop";
@@ -317,8 +310,7 @@ QString XmlGenerator::linkForNode(const Node *node, const Node *relative)
return QString();
QString fn = fileName(node);
- if (node->parent() && (node->parent()->isQmlType() || node->parent()->isJsType())
- && node->parent()->isAbstract()) {
+ if (node->parent() && node->parent()->isQmlType() && node->parent()->isAbstract()) {
if (Generator::qmlTypeContext()) {
if (Generator::qmlTypeContext()->inherits(node->parent())) {
fn = fileName(Generator::qmlTypeContext());