From 873730effec1e5915cf67e6c9dde264b447d77d7 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 30 Jun 2013 11:01:09 +0200 Subject: [PATCH] PySide stuff --- src/Gui/WidgetFactory.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index 2996f2592..a499c326b 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -23,7 +23,10 @@ #include "PreCompiled.h" -#if 0 // disable for now +// Remove this block when activating PySide support! +#undef HAVE_SHIBOKEN +#undef HAVE_PYSIDE + #ifdef HAVE_SHIBOKEN # undef _POSIX_C_SOURCE # undef _XOPEN_SOURCE @@ -35,7 +38,6 @@ PyTypeObject** SbkPySide_QtCoreTypes=NULL; # endif #endif -#endif #include #include @@ -57,9 +59,8 @@ PythonWrapper::PythonWrapper() QObject* PythonWrapper::toQObject(const Py::Object& pyobject) { -#if 0 // http://pastebin.com/JByDAF5Z -//#if defined (HAVE_SHIBOKEN) && defined(HAVE_PYSIDE) +#if defined (HAVE_SHIBOKEN) && defined(HAVE_PYSIDE) PyTypeObject * type = Shiboken::SbkType(); if (type) { if (Shiboken::Object::checkType(pyobject.ptr())) { @@ -95,8 +96,7 @@ Py::Object PythonWrapper::toPython(QWidget* widget) bool PythonWrapper::loadModule() { -#if 0 -//#if defined (HAVE_SHIBOKEN) && defined(HAVE_PYSIDE) +#if defined (HAVE_SHIBOKEN) && defined(HAVE_PYSIDE) if (SbkPySide_QtCoreTypes) return true; // already loaded Shiboken::AutoDecRef requiredModule(Shiboken::Module::import("PySide.QtCore"));