From 334b43a8587cf5049a8bedfd7bc9fda1d20cef3d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 10 May 2021 08:31:46 +0200 Subject: shiboken6: Add option to use global headers shiboken6 historically expected a global header consisting of #include directives for the desired headers which was excluded from the generated code. Make it possible to use class headers directly with a command line option. Task-number: PYSIDE-1338 Change-Id: I4543be888136736deb2612abc27dfc04e177e469 Reviewed-by: Christian Tismer Reviewed-by: Cristian Maureira-Fredes (cherry picked from commit d075757286e0b7fbbef118eee4720671d48fc91b) Reviewed-by: Qt Cherry-pick Bot --- sources/shiboken6/doc/shibokengenerator.rst | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sources/shiboken6/doc/shibokengenerator.rst') diff --git a/sources/shiboken6/doc/shibokengenerator.rst b/sources/shiboken6/doc/shibokengenerator.rst index ee0b54800..a5092bfd6 100644 --- a/sources/shiboken6/doc/shibokengenerator.rst +++ b/sources/shiboken6/doc/shibokengenerator.rst @@ -49,8 +49,16 @@ care of interfacing Python and the underlying C++ library. Handwritten inputs ================== -Creating new bindings involves creating two pieces of "code": the typesystem and -the inject code. +Creating new bindings involves creating several pieces of "code": the header, +the typesystem and, in most cases, the injected code. + +:header: A header with ``#include`` directives listing all the headers of the + desired classes. This header is not referenced by the generated code. + Alternatively, it is possible to pass a list of the headers of the + desired classes directly on the command line. In this case, + the command line option ``--use-global-header`` should be passed as + well to prevent the headers from being suppressed in the generated + code. :typesystem: XML files that provides the developer with a tool to customize the way that the generators will see the classes and functions. For @@ -127,6 +135,9 @@ Options fully qualified Python type names ('Module.Class'), but the module can be omitted ('Class'). +``--use-global-header`` + Use the global headers passed on the command line in generated code. + .. _generation-set: ``--generation-set`` -- cgit v1.2.3