aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/shibokenmodule
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2019-10-29 18:58:54 +0100
committerChristian Tismer <tismer@stackless.com>2019-10-30 23:03:39 +0100
commit67929d31c4ab91b357957a9a47c16a8a6b42cf52 (patch)
tree5344abd4210cda11f1ec6f758ca91e0c8fd9f64f /sources/shiboken2/shibokenmodule
parent46d44749d01b7bd195e8838e681b227aef4b5f06 (diff)
Fix the registry after merging
In 5.13 we did not check the registry. By change https://codereview.qt-project.org/c/pyside/pyside-setup/+/278244 more functions are generated, which are not yet in 5.14 . By repeating the removal of that patch, together with the recreation of the registry files, we add by hand what the merge could not do automatically. This took quite a while to understand :-) "SharedPtr" and maybe other classes may create an infinite recursion via some "._gorg" property from the typing module for Python 2.7 . We simply skip that effect. Change-Id: I85568b08bb6ac87b5dbf6a2823e4a71f69f8b4ad Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/shibokenmodule')
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
index 2e4d67186..f11f3cf3d 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
@@ -100,11 +100,6 @@ class ExactEnumerator(object):
return ret
def klass(self, class_name, klass):
- modname = klass.__module__
- if not (modname.startswith("PySide2") or modname.startswith("shiboken2")):
- # don't look into any foreign classes!
- ret = self.result_type()
- return ret
bases_list = []
for base in klass.__bases__:
name = base.__name__
@@ -147,6 +142,12 @@ class ExactEnumerator(object):
with self.fmt.enum(class_name, enum_name, int(value)):
pass
for subclass_name, subclass in subclasses:
+ if klass == subclass:
+ # this is a side effect of the typing module for Python 2.7
+ # via the "._gorg" property, which we can safely ignore.
+ print("Warning: {class_name} points to itself via {subclass_name}, skipped!"
+ .format(**locals()))
+ continue
ret.update(self.klass(subclass_name, subclass))
self.fmt.class_name = class_name
ret.update(self.function("__init__", klass))