From 3658eedc971a62a5ea8b202e0dd9f89abacdb61e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 26 Jul 2012 10:48:42 +0200 Subject: qdoc: Changed \qmlclass to \qmltype, added \instantiates The \qmlclass qdoc command is now deprecated. Use \qmltype instead. \qmlclass had two arguments, the QML type name and, if the QML type was elemental, the name of the C++ class that the QML element instantiates. The \qmltype command has only one argument, the QML type name. If the QML type is elemental, then the \qmltype command should be followed by a \instantiates context command in the same qdoc comment. e.g.: \qmltype Item \instantiates QDeclarativeItem When the developer does not include the \instantiates command for an elemental QML type, qdoc will no longer be able to detect that the C++ class name is missing, and qdoc will no longer be able to detect when the name specified for a \qmlproperty of the elemental QML type has the wrong name. Task nr: QTBUG-26648 Change-Id: Ia60872a35113a6f615bfc751ce1e9db6279dfb8e Reviewed-by: Casper van Donderen --- src/tools/qdoc/qmlcodeparser.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tools/qdoc/qmlcodeparser.cpp') diff --git a/src/tools/qdoc/qmlcodeparser.cpp b/src/tools/qdoc/qmlcodeparser.cpp index f096a390e80..57885cfa1a2 100644 --- a/src/tools/qdoc/qmlcodeparser.cpp +++ b/src/tools/qdoc/qmlcodeparser.cpp @@ -68,10 +68,12 @@ QT_BEGIN_NAMESPACE #define COMMAND_QMLABSTRACT Doc::alias("qmlabstract") #define COMMAND_QMLCLASS Doc::alias("qmlclass") +#define COMMAND_QMLTYPE Doc::alias("qmltype") #define COMMAND_QMLMODULE Doc::alias("qmlmodule") #define COMMAND_QMLPROPERTY Doc::alias("qmlproperty") #define COMMAND_QMLATTACHEDPROPERTY Doc::alias("qmlattachedproperty") #define COMMAND_QMLINHERITS Doc::alias("inherits") +#define COMMAND_QMLINSTANTIATES Doc::alias("instantiates") #define COMMAND_INQMLMODULE Doc::alias("inqmlmodule") #define COMMAND_QMLSIGNAL Doc::alias("qmlsignal") #define COMMAND_QMLATTACHEDSIGNAL Doc::alias("qmlattachedsignal") @@ -196,6 +198,7 @@ QSet QmlCodeParser::topicCommands() { return QSet() << COMMAND_VARIABLE << COMMAND_QMLCLASS + << COMMAND_QMLTYPE << COMMAND_QMLPROPERTY << COMMAND_QMLATTACHEDPROPERTY << COMMAND_QMLSIGNAL -- cgit v1.2.3