diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-10-04 08:19:51 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-10-06 08:34:00 +0200 |
| commit | 1e4cbb0b1150124943248031dad4ce27503e487d (patch) | |
| tree | 01b044ccdb2b253716a0680f50f00045f6e66092 /sources/pyside6/tests/pysidetest/sharedpointertestbench.cpp | |
| parent | c36a5c4978f25656c7c56d0118c2a88d55f69b77 (diff) | |
shiboken6: Fix smart pointers of type <const Pointee>
Use the right function to strip the qualifications from
the type since <const Pointee> and <Pointee> are treated identically.
Fixes a regression introduced by change
a262e9bae5dbdef92d5caa0e058a1ad07fa974d3.
This is in principle tested in the smart binding test, but
occurs depending on the order the types are seen, so, add another
test.
Fixes: PYSIDE-2071
Pick-to: 6.3
Change-Id: I838b1ae1dd607095b41018c973093a380f51ab6b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/tests/pysidetest/sharedpointertestbench.cpp')
| -rw-r--r-- | sources/pyside6/tests/pysidetest/sharedpointertestbench.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/pyside6/tests/pysidetest/sharedpointertestbench.cpp b/sources/pyside6/tests/pysidetest/sharedpointertestbench.cpp index a901570cc..57724045e 100644 --- a/sources/pyside6/tests/pysidetest/sharedpointertestbench.cpp +++ b/sources/pyside6/tests/pysidetest/sharedpointertestbench.cpp @@ -29,3 +29,16 @@ void SharedPointerTestbench::printSharedPointerQObject(const QSharedPointer<QObj { qDebug() << __FUNCTION__ << p.data(); } + +QSharedPointer<const QObject> SharedPointerTestbench::createSharedPointerConstQObject() +{ + auto *o = new QObject; + o->setObjectName(u"ConstTestObject"_qs); + QSharedPointer<const QObject> result(o); + return result; +} + +void SharedPointerTestbench::printSharedPointerConstQObject(const QSharedPointer<const QObject> &p) +{ + qDebug() << __FUNCTION__ << p.data(); +} |
