diff options
author | Christian Tismer <tismer@stackless.com> | 2021-01-31 18:05:56 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-11 12:56:56 +0000 |
commit | 84eaf8c056b01f91cbd29ff5a363829710688510 (patch) | |
tree | 67a916d150c409075367d3bd885c7f753e29dfb0 | |
parent | 88e5e9e0399d58b67028ea3082d3b3f5f7429823 (diff) |
feature: Supply switching for newly created objects
Switching was quite complete, but when the module with
a feature selection created a new object, no switching
of the new object happens.
This was a pretty hard to find bug, but the solution was trivial.
Task-number: PYSIDE-79
Fixes: PYSIDE-1478
Change-Id: I663a562d4d9512b627b3add37df0908f9d785e1f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit d158720ec4dd3fe8623faaf9afcb2e7f9f368e51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index aaab6906a..9eec438a6 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -1885,6 +1885,10 @@ void CppGenerator::writeConstructorWrapper(TextStream &s, const AbstractMetaFunc s << outdent << '\n'; } + // PYSIDE-1478: Switching must also happen at object creation time. + if (usePySideExtensions()) + s << "PySide::Feature::Select(self);\n"; + writeMethodWrapperPreamble(s, overloadData, classContext); s << '\n'; |