diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-14 10:37:10 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-16 14:59:36 +0200 |
commit | b6eaa63a81654459827851a261ad50829cc511ba (patch) | |
tree | c72b3afbe93e4897be5381ec5e1d3f294cef9e8c /sources/shiboken2/doc | |
parent | dedbc42b569d0dc25de10712168b99d0844c8e50 (diff) |
Remove dependency of the QtQml module header on pysideqmlregistertype.h
Make it possible to inject code into module headers by
specifying "declaration" on type system code snippets.
Use that to insert the struct definition into pyside2_qtqml_python.h
and remove the include. Add the required includes via code injection
into the wrapper and extra includes for the types.
Fixes: PYSIDE-1381
Change-Id: I8dfda4c33d66f56e8fb516e1b174cc43664ca318
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/doc')
-rw-r--r-- | sources/shiboken2/doc/typesystem_codeinjection.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken2/doc/typesystem_codeinjection.rst b/sources/shiboken2/doc/typesystem_codeinjection.rst index 684630dd4..4ca77aa54 100644 --- a/sources/shiboken2/doc/typesystem_codeinjection.rst +++ b/sources/shiboken2/doc/typesystem_codeinjection.rst @@ -114,6 +114,8 @@ The following table describes the semantics of ``inject-code`` tag as used on | | |end |Insert code at the end of the module initialization function | | | | |(``initMODULENAME()``), but before the checking that emits a | | | | |fatal error in case of problems importing the module. | + | | +-----------+--------------------------------------------------------------+ + | | |declaration|Insert code into module header. | +---------------+------+-----------+--------------------------------------------------------------+ @@ -400,3 +402,6 @@ to prevent bad custom code to pass unnoticed. (...) // Start of ``MODULENAME_module_wrapper.cpp`` + +In addition, code can be injected into the module header by specifying ``target`` +and ``declaration``. This is useful for type definitions. |