From 62a2f46d290c67343366cb4f707830fe7d8b3d63 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 13 Feb 2015 13:00:22 +0100 Subject: qdoc: Support documentation of JavaScript MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This update provides the actual support for documenting JavaScript. It has been tested with JavaScript commands in qdoc comments in .qdoc files but not in .js files. Currently, we have the use case of needing to document JavaScript using qdoc comments in .qdoc files. For each qdoc command for QML, i.e. \qmltype, \qmlproperty, etc, there is now a corresponding JavaScript command, i.e. \jstype, \jsproperty, etc. Some of these might not be needed, but they are all provided. Briefly, document JavaScript in a .qdoc file the same way you would document QML in a .qdoc file, but instead of using the \qmlxxx commands, use \jsxxx commands. Change-Id: Ib68a5f66c16472af87d9f776db162332ca13fbb7 Task-number: QTBUG-43715 Reviewed-by: Topi Reiniƶ --- src/tools/qdoc/cppcodeparser.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/tools/qdoc/cppcodeparser.h') diff --git a/src/tools/qdoc/cppcodeparser.h b/src/tools/qdoc/cppcodeparser.h index 9c775da538d..dc5c8ca8bd2 100644 --- a/src/tools/qdoc/cppcodeparser.h +++ b/src/tools/qdoc/cppcodeparser.h @@ -81,7 +81,7 @@ protected: virtual Node* processTopicCommand(const Doc& doc, const QString& command, const ArgLocPair& arg); - void processQmlProperties(const Doc& doc, NodeList& nodes, DocList& docs); + void processQmlProperties(const Doc& doc, NodeList& nodes, DocList& docs, bool jsProps); bool splitQmlPropertyGroupArg(const QString& arg, QString& module, QString& element, @@ -148,7 +148,7 @@ protected: void instantiateIteratorMacro(const QString &container, const QString &includeFile, const QString ¯oDef); - void createExampleFileNodes(DocNode *dn); + void createExampleFileNodes(DocumentNode *dn); protected: QMap nodeTypeMap; @@ -203,7 +203,6 @@ protected: #define COMMAND_TYPEDEF Doc::alias("typedef") #define COMMAND_VARIABLE Doc::alias("variable") #define COMMAND_QMLABSTRACT Doc::alias("qmlabstract") -#define COMMAND_QMLCLASS Doc::alias("qmlclass") #define COMMAND_QMLTYPE Doc::alias("qmltype") #define COMMAND_QMLPROPERTY Doc::alias("qmlproperty") #define COMMAND_QMLPROPERTYGROUP Doc::alias("qmlpropertygroup") -- cgit v1.2.3