diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-12 13:17:36 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-22 13:17:27 +0200 |
commit | 5b19cf6ab082c6be5f9177925f3e3180ca02ed4c (patch) | |
tree | bf426790810ccadeafbdb2e81283d263fb18c09b /sources/shiboken6/generator | |
parent | 193769216f60f87feb20bbffa832cc159bbe525c (diff) |
shiboken6: Introduce new position for code injection into virtual methods
Make it possible to inject code before the Python override is called.
Task-number: PYSIDE-2602
Pick-to: 6.7
Change-Id: I0e5b4ced34ae8b41df5acdb34912b853f60b372f
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/generator')
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index 35a9d1842..4ac6492e9 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -1216,6 +1216,11 @@ void CppGenerator::writeVirtualMethodNative(TextStream &s, returnStatement.statement, true); s << outdent << "}\n\n"; //WS + if (!snips.isEmpty()) { + writeCodeSnips(s, snips, TypeSystem::CodeSnipPositionPyOverride, + TypeSystem::ShellCode, func, false, lastArg); + } + writeVirtualMethodPythonOverride(s, func, snips, returnStatement); } |