aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2022-09-05 16:30:42 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-07 00:48:41 +0000
commitf6c45eeda3aa6f82cb5e8a2daefadd8974a21f82 (patch)
tree49940498c31c8158b656f210a57e113a79bfc1f4 /src
parenteefa79a7c06855026d84fa22c368a107026da017 (diff)
QQmlEngineExtensionPlugin: Mention that CMake API is generally fine
With qt_add_qml_module, the generated plugin will be sufficiant most of the time. Mention that this is the case, and also mention NO_GENERATE_PVUGIN_SOURCE for the case where customization is required (most likely to occur with image providers). Fixes: QTBUG-106270 Change-Id: I7e9399f9617e7d531b84b68afc9e8f9aa85f0704 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 2ca9d70c17e790f55f9b09088e1c3bca77488560) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/qml/doc/src/qmllanguageref/modules/qqmlextensionplugin.qdocinc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/doc/src/qmllanguageref/modules/qqmlextensionplugin.qdocinc b/src/qml/doc/src/qmllanguageref/modules/qqmlextensionplugin.qdocinc
index c37fb81401..fca702a278 100644
--- a/src/qml/doc/src/qmllanguageref/modules/qqmlextensionplugin.qdocinc
+++ b/src/qml/doc/src/qmllanguageref/modules/qqmlextensionplugin.qdocinc
@@ -38,6 +38,14 @@ plugins. Library plugins should limit themselves to registering types, as
any manipulation of the engine's root context may cause conflicts or other
issues in the library user's code.
+\note When using the CMake \l qt_add_qml_module API, a plugin will be generated
+automatically for you. It will take care of type registration.
+You only need to write a custom plugin if you have special
+requirements, such as registering custom image
+providers. In that case, pass
+\l{NO_GENERATE_PLUGIN_SOURCE} to the \c qt_add_qml_module
+call to disable the generation of the default plugin.
+
The linker might erroneously remove the generated type registration
function as an optimization. You can prevent that by declaring a synthetic
volatile pointer to the function somewhere in your code. If your module is