diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-18 09:50:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-19 21:38:55 +0200 |
commit | 2d174a7fa78944b094ff7056454236b4560c0092 (patch) | |
tree | 1dfe3f9dac5c525cfa7e12578e7c00effb039051 /sources/shiboken2/generator/shiboken2/cppgenerator.h | |
parent | 40b06f4998509252356c0104981685fe5cd57bc9 (diff) |
shiboken2: Refactor wrapper method generation
For virtual functions, the code injection for shell/beginning
was not written to the shortcut path added by
50f382579d1323817165d85bf88a394328a4e9a0 (when the method cache
is set, indicating there is no python override).
Factor out the code into a separate function. As a drive by,
actually generate the (hiterto unimplemented) shell/end
injection at least for void functions.
Task-number: PYSIDE-803
Task-number: PYSIDE-1282
Change-Id: If56f839d414bf7364fdf6af5f3f0d5a76a5fc434
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/cppgenerator.h')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.h b/sources/shiboken2/generator/shiboken2/cppgenerator.h index 4e995d56f..16ee412c9 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.h +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.h @@ -60,7 +60,10 @@ private: QString getVirtualFunctionReturnTypeName(const AbstractMetaFunction *func); void writeVirtualMethodNative(QTextStream &s, const AbstractMetaFunction *func, int cacheIndex); - + void writeVirtualMethodCppCall(QTextStream &s, const AbstractMetaFunction *func, + const QString &funcName, const CodeSnipList &snips, + const AbstractMetaArgument *lastArg, const TypeEntry *retType, + const DefaultValue &defaultReturnExpr); void writeMetaObjectMethod(QTextStream &s, const GeneratorContext &classContext); void writeMetaCast(QTextStream &s, const GeneratorContext &classContext); |