From efc41eaa7224c33b5b5af7eae27c93c6748255bc Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 30 Nov 2010 13:48:30 +1000 Subject: Document which header to include for qmlRegister functions. Task-number: QTBUG-15630 Reviewed-by: Bea Lam --- doc/src/declarative/extending.qdoc | 2 ++ doc/src/declarative/qtdeclarative.qdoc | 16 ++++++++++++++++ .../declarative/qtbinding/newelements/imageviewer.h | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 5c1b977..740f7d1 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -75,6 +75,8 @@ constructor. \endquotation +#include to use qmlRegisterType(). + Types can be registered by libraries, application code, or by plugins (see QDeclarativeExtensionPlugin). diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index f2b2032..b0c6e06 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -57,6 +57,8 @@ \relates QDeclarativeEngine Equivalent to \c Q_DECLARE_METATYPE(TYPE) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty) + + #include to use this macro. */ /*! @@ -68,6 +70,8 @@ Current the only supported type info is \c QML_HAS_ATTACHED_PROPERTIES which declares that the \a Type supports \l {Attached Properties}. + + #include to use this macro. */ @@ -86,6 +90,10 @@ "com.mycompany.qmlcomponents": \code + #include + + ... + qmlRegisterType("com.mycompany.qmlcomponents", 1, 0, "Slider"); \endcode @@ -119,6 +127,8 @@ Returns the QML type id. + #include to use this function. + \sa qmlRegisterTypeNotAvailable() */ @@ -154,6 +164,8 @@ Without this, a generic "Game is not a type" message would be given. + #include to use this function. + \sa qmlRegisterUncreatableType() */ @@ -166,6 +178,8 @@ system. Instances of this type cannot be created from the QML system. + #include to use this function. + Returns the QML type id. */ @@ -176,5 +190,7 @@ This template function registers the C++ type in the QML system under the name \a typeName. + #include to use this function. + Returns the QML type id. */ diff --git a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h b/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h index fd9db5e..cec9757 100644 --- a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h +++ b/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h @@ -37,10 +37,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +//![0] #include #include -//![0] class ImageViewer : public QDeclarativeItem { Q_OBJECT -- cgit v0.12