diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-04-02 16:01:34 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-05 09:50:05 +0200 |
commit | 664a0e3f498db65f74b0e0181a0ec76cd6691a34 (patch) | |
tree | a10b0e66ee03eb1887f0ed8e1511e1e82d2da5ae /doc/src | |
parent | 2149e9e617f72324bc9297ade3dc1884e15d75c1 (diff) |
Use the updated module api registration function in example
Previously, the example used the non-templated registration function.
This commit also links the qmlRegisterModuleApi documentation from the
"Creating QML Types" page.
Change-Id: I43afb5c051a52fef4059160972f7508f40dac523
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/qml/qmltypes.qdoc | 2 | ||||
-rw-r--r-- | doc/src/qml/qtdeclarative.qdoc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/doc/src/qml/qmltypes.qdoc b/doc/src/qml/qmltypes.qdoc index ae4ad47c3d..b75c191616 100644 --- a/doc/src/qml/qmltypes.qdoc +++ b/doc/src/qml/qmltypes.qdoc @@ -70,6 +70,8 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c Alternatively, these functions provide a way for other types of C++ types to be visible in the QML context. \list + \li \l qmlRegisterModuleApi() is suited for registering either a QJSValue + or QObject module API (shared instance) into a namespace \li \l qmlRegisterUncreatableType() is suited for attached properties and enum types. \li \l qmlRegisterTypeNotAvailable() is for diff --git a/doc/src/qml/qtdeclarative.qdoc b/doc/src/qml/qtdeclarative.qdoc index 48cc898458..5ad637ab50 100644 --- a/doc/src/qml/qtdeclarative.qdoc +++ b/doc/src/qml/qtdeclarative.qdoc @@ -351,7 +351,7 @@ // third, register the module API provider with QML by calling this function in an initialization function. ... - qmlRegisterModuleApi("Qt.example.qobjectApi", 1, 0, example_qobject_module_api_provider); + qmlRegisterModuleApi<ModuleApiExample>("Qt.example.qobjectApi", 1, 0, example_qobject_module_api_provider); ... \endcode |