Fix heaptype conflict with QtCore.QObject.__new__in Python 2.7
The patching of the type generation needs to become universal.
Additional to the patch for SbkObjectType_TypeF, we now patch
* SbkObjectTypeTpNew
* introduceWrapperType
which makes the modifications for the heaptype flag complete.
Actually, the modification of tp_new_wrapper has to be more
sophisticated in this general case:
We follow the __mro__ and patch exactly those functions which
have the old wrapper and add the new wrapper.
signature: Support typing.Optional[T] and refine a bit
The signature was missing "typing.Optional[T]" which has to be wrapped
around any argument with a default value of "None".
This is the only case where the repr of a type looks different than
it was written, because it renders as "typing.Union[T, NoneType]".
Solving that by redefining a few typing structures was way too
hard and too error prone. It was finally solved by a regex replacemet
that is run as a post process in generate_pyi.py .
The enumerations are now even more complete, since toplevel enums
are also included. This had the effect that enums with Python
keywords were revealed, and so the function "createEnumItem" had
to be modified.
The order of creation was also changed to avoid name clashes.
The overall structure was improved, and instead of parsing the
generated signatures to find out if something is a class method,
this is now very cleanly implemented as an inquiry to get_signature().
I tried to make sense of the flags structure that comes with many
enums. PyQt5 has a standard set of "__...__" methods without useful
signature information. I could mimick that as well, but that would
create a whole lot of pointless extra information. We should decide
later if it makes sense to include that. Right now the flags
structures show the class name, only.
This patch will be merged with the 5.14 branch. The additions of this
patch could fortunately be placed into areas which do almost not
overlap with the 5.14 signature additions.
4d63dff...
by
=?utf-8?q?Cristi=C3=A1n_Maureira-Fredes?= <email address hidden>
CMake modularization: macros creation
First step of this process that only considers the idea of
encapsulate the diffrent CMake processes we currently have in all
our main CMakeLists.txt files.
This patch simply takes some sections of the existing cmake files
and move them to a macro file.
Additionally, a couple of macros were written twice in shiboken
and pyside, so now they are only once.
Task-number: PYSIDE-1033
Change-Id: I2c63d8a2eba3d8951097ec9c9042c782fde5dd62
Reviewed-by: Alexandru Croitor <email address hidden>
Reviewed-by: Qt CI Bot <email address hidden>
Reviewed-by: Christian Tismer <email address hidden>
5e4d33d...
by
Jukka Jokiniva <email address hidden>
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"
b29fb92...
by
Jukka Jokiniva <email address hidden>
Merge remote-tracking branch 'origin/5.12' into 5.13