aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-01-31 18:05:56 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-01 08:07:51 +0000
commitd158720ec4dd3fe8623faaf9afcb2e7f9f368e51 (patch)
tree3f7a42305e5c5bcdb6c07b9b584195f96aab34d5
parentddb03b40f311a9c34b599136ac1cb0324f6b2b42 (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 Pick-to: 6.0 Pick-to: 5.15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index 474ba1943..f5f2b7db4 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -1882,6 +1882,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';