From 8c9037dc83fbdbb0b9913961fbe7f84066630e18 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 5 Sep 2017 13:41:43 +0200 Subject: Remove dead / unused code regarding conversions There's a lot of code that was previously used for doing conversions between C++ / Python types (apparently relying on extensive RTTI / typeid manipulations), which got superseded by a cleaner templated approach. The old code was left behind, and there were a few instances where it was still used even though it wasn't needed, like in QtScript typesystem XML and shiboken's enum handling. Remove the old code, apply the small changes needed to make it work with new the code. This is cleanup to reduce the confusion regarding conversion behavior, and also preparation for a proper implementation of handling "void*" types. Change-Id: I8f16bb31436f9a677bb2d64c7197c4375005b656 Reviewed-by: Friedemann Kleint --- sources/pyside2/libpyside/signalmanager.cpp.in | 28 ++------------------------ 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'sources/pyside2/libpyside/signalmanager.cpp.in') diff --git a/sources/pyside2/libpyside/signalmanager.cpp.in b/sources/pyside2/libpyside/signalmanager.cpp.in index 473057cbc..8ede09610 100644 --- a/sources/pyside2/libpyside/signalmanager.cpp.in +++ b/sources/pyside2/libpyside/signalmanager.cpp.in @@ -55,10 +55,10 @@ #include #include #include -#include #include +#include #include -#include +#include // These private headers are needed to throw JavaScript exceptions #if @QML_PRIVATE_API_SUPPORT@ @@ -214,30 +214,6 @@ QDataStream &operator>>(QDataStream& in, PyObjectWrapper& myObj) }; -namespace Shiboken { - -template<> -struct Converter -{ - static PySide::PyObjectWrapper toCpp(PyObject* obj) - { - return PySide::PyObjectWrapper(obj); - } - - static PyObject* toPython(void* obj) - { - return toPython(*reinterpret_cast(obj)); - } - - static PyObject* toPython(const PySide::PyObjectWrapper& obj) - { - Py_INCREF((PyObject*)obj); - return obj; - } -}; - -}; - using namespace PySide; struct SignalManager::SignalManagerPrivate -- cgit v1.2.3