aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/libsmart/smart.cpp
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.araujo@kdab.com>2019-02-18 14:43:41 -0300
committerRenato Araujo Oliveira Filho <renato.araujo@kdab.com>2019-02-26 18:02:21 +0000
commit2dd12f480d35194eaa2c97638cf972a09803c68a (patch)
treeb3eca28cdd9aaf496bc4a925d38e101839d94b14 /sources/shiboken2/tests/libsmart/smart.cpp
parentc6c1a3e099a8139137d6ef133d1d399ba1ee38bd (diff)
Fix conversions of list of smart pointers to python
While converting smart pointers do not initialize the object with default/minimal constructor. Change-Id: Ie9400d8487accc0c90b0f0b31b855038ae698b5c Task-Id: PYSIDE-947 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/tests/libsmart/smart.cpp')
-rw-r--r--sources/shiboken2/tests/libsmart/smart.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/sources/shiboken2/tests/libsmart/smart.cpp b/sources/shiboken2/tests/libsmart/smart.cpp
index 4132c2fc8..8d85d67a1 100644
--- a/sources/shiboken2/tests/libsmart/smart.cpp
+++ b/sources/shiboken2/tests/libsmart/smart.cpp
@@ -62,6 +62,15 @@ SharedPtr<Obj> Obj::giveSharedPtrToObj()
return o;
}
+std::vector<SharedPtr<Obj> > Obj::giveSharedPtrToObjList(int size)
+{
+ std::vector<SharedPtr<Obj> > r;
+ for (int i=0; i < size; i++)
+ r.push_back(giveSharedPtrToObj());
+ return r;
+}
+
+
SharedPtr<Integer> Obj::giveSharedPtrToInteger()
{
SharedPtr<Integer> o(new Integer);