diff options
author | Christian Tismer <tismer@stackless.com> | 2021-04-05 19:25:46 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-04-07 11:37:14 +0000 |
commit | 8bf8b4bd5a760c2089faeac00491dddcda2681ab (patch) | |
tree | bbf9290675c6c524013e424d93f2dca2466b7213 /sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py | |
parent | 8d1a8885dd8f6397184889e4a49cb666fdd8b66c (diff) |
signature: protect an unrecognized item from raising exceptions
A special case "std::optional" caused an exception at an unforeseen
place, because "std" was not recognized in an eval.
Turn this into another runtime warning.
Also, the "std::optional" case was added as "typing.Optional"
after applying und testing the above fix.
Change-Id: I722ae463d133125e96ab09aeb38f21cdc2453d5b
Fixes: PYSIDE-1538
Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 0a47111b454b8e1582d8595cadc348b61989ff29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py')
-rw-r--r-- | sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py index e6ad8d3d0..23c62717b 100644 --- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py +++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py @@ -352,6 +352,10 @@ type_map.update({ "self" : "self", }) +# PYSIDE-1538: We need to treat "std::optional" accordingly. +type_map.update({ + "std.optional": typing.Optional, + }) # The Shiboken Part def init_Shiboken(): |