summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/cppcodeparser.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2015-01-30 10:21:46 +0100
committerMartin Smith <martin.smith@digia.com>2015-02-20 11:37:07 +0000
commitfe7c2662b5a6a458459bf11b8d06a2b34318918d (patch)
tree2232ab01c547cea0c1a5855bce5741f5595767b7 /src/tools/qdoc/cppcodeparser.cpp
parentedb2ad9117ee1598f18ad79fd2493ca53b0c9513 (diff)
qdoc: Mark Genus of each Node object
The concept of Genus was introduced to allow link commands (\l) to specify what kind of entity should be accepted as the link target. Possible values were CPP, QML, DOC, and DONTCARE. This became necessary when we started seeing more cases where the same name was used for a C++ class and a QML type. The Genus for an entity was returned by a member function of the specific subclass of Node that represents that entity. For example, QmlTypeNode::genus() returns QML, while Class::genus() returns CPP. Now we are seeing an increasing need to document Javascript. Rather than add subclasses of all the QmlXxxNode classes to represent the javascript entities, the Qml Node subclasses will be used. JS is added to the Genus enum to mark Nodes that represent javascript entities. But this requires storing the Genus value in the node, rather than just having a member function in each subclass return it. Now there are two member functions in the Node base class, genus() and setGenus(), and the value is stored in the Node. This doesn't increase the size, because there was a byte available. Change-Id: Ifcee78595f4288792e09bb255d2e8c01ebafac46 Task-number: QTBUG-43715 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/cppcodeparser.cpp')
-rw-r--r--src/tools/qdoc/cppcodeparser.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp
index a03f9dad2e..2f26dd1f64 100644
--- a/src/tools/qdoc/cppcodeparser.cpp
+++ b/src/tools/qdoc/cppcodeparser.cpp
@@ -295,7 +295,17 @@ const QSet<QString>& CppCodeParser::topicCommands()
<< COMMAND_QMLMETHOD
<< COMMAND_QMLATTACHEDMETHOD
<< COMMAND_QMLBASICTYPE
- << COMMAND_QMLMODULE;
+ << COMMAND_QMLMODULE
+ << COMMAND_JSTYPE
+ << COMMAND_JSPROPERTY
+ << COMMAND_JSPROPERTYGROUP
+ << COMMAND_JSATTACHEDPROPERTY
+ << COMMAND_JSSIGNAL
+ << COMMAND_JSATTACHEDSIGNAL
+ << COMMAND_JSMETHOD
+ << COMMAND_JSATTACHEDMETHOD
+ << COMMAND_JSBASICTYPE
+ << COMMAND_JSMODULE;
}
return topicCommands_;
}