From 5c9afb798ecc9ec29622464c9c96909a2e79f220 Mon Sep 17 00:00:00 2001 From: renatofilho Date: Thu, 14 Oct 2010 16:32:29 -0300 Subject: WId conversions used on Windows OS. Fixes bug #399. Reviewer: Hugo Parente Lima Luciano Wolf --- PySide/QtGui/glue/wid_conversions.h | 32 ++++++++++++++++++++++++++++++++ PySide/QtGui/typesystem_gui_win.xml | 5 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 PySide/QtGui/glue/wid_conversions.h (limited to 'PySide') diff --git a/PySide/QtGui/glue/wid_conversions.h b/PySide/QtGui/glue/wid_conversions.h new file mode 100644 index 000000000..9901218a1 --- /dev/null +++ b/PySide/QtGui/glue/wid_conversions.h @@ -0,0 +1,32 @@ +namespace Shiboken { +template <> +struct Converter +{ + static bool checkType(PyObject* pyObj) + { + return false; + } + + static bool isConvertible(PyObject* pyobj) + { + return PyCObject_Check(pyobj); + } + + static inline PyObject* toPython(void* cppobj) + { + // not supported + Q_ASSERT(true); + return 0; + } + + static PyObject* toPython(WId cppobj) + { + return PyCObject_FromVoidPtr(cppobj, 0); + } + + static WId toCpp(PyObject* pyobj) + { + return (WId) PyCObject_AsVoidPtr(pyobj); + } +}; +} diff --git a/PySide/QtGui/typesystem_gui_win.xml b/PySide/QtGui/typesystem_gui_win.xml index bc4690925..124929674 100644 --- a/PySide/QtGui/typesystem_gui_win.xml +++ b/PySide/QtGui/typesystem_gui_win.xml @@ -19,6 +19,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --> - + + + + -- cgit v1.2.3