aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.araujo@kdab.com>2019-02-19 08:41:38 -0300
committerRenato Araujo Oliveira Filho <renato.araujo@kdab.com>2019-02-21 11:58:51 +0000
commit4c48e8e53fc566270bb639f09bb2de3d5ddbd5cf (patch)
tree11901392577797f3d733305a42224a57a75cc787 /sources/shiboken2/tests/smartbinding/smart_pointer_test.py
parent2137f859ec204c8adbb024f348e20a5b87c1792c (diff)
Fix smart pointers with namespace
Use the cppName when looking for metatype while generating smart pointer getter function Change-Id: Ib3a632dd7f667a6bf7c487cfb673f0e55cbddde9 Fixes: PYSIDE-948 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/tests/smartbinding/smart_pointer_test.py')
-rw-r--r--sources/shiboken2/tests/smartbinding/smart_pointer_test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/shiboken2/tests/smartbinding/smart_pointer_test.py b/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
index 730b4a0da..62bfc0500 100644
--- a/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
+++ b/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
@@ -143,5 +143,18 @@ class SmartPointerTests(unittest.TestCase):
self.assertEqual(objCount(), 0)
self.assertEqual(integerCount(), 0)
+ def testSmartPointersWithNamespace(self):
+ # Create the main object
+ o = Obj()
+ self.assertEqual(objCount(), 1)
+
+ # Create a shared pointer to an Integer together with an Integer.
+ ptrToInteger = o.giveSharedPtrToInteger2()
+ self.assertEqual(objCount(), 1)
+ self.assertEqual(integerCount(), 2)
+
+ integer = ptrToInteger.data()
+ self.assertTrue(integer)
+
if __name__ == '__main__':
unittest.main()