From 2004653fe4ff6bc56bc29cfec84abdd4f6adf2c0 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 24 Oct 2018 23:12:59 +0200 Subject: [PATCH] check for existence of PySide stuff when defining convertWrapperToQuantity --- src/Gui/WidgetFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index 85262a12a4..d09f2448be 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -161,7 +161,7 @@ PythonToCppFunc isBaseQuantity_PythonToCpp_QVariantConvertible(PyObject* obj) return 0; } -#if QT_VERSION >= 0x050200 +#if defined (HAVE_PYSIDE) && QT_VERSION >= 0x050200 Base::Quantity convertWrapperToQuantity(const PySide::PyObjectWrapper &w) { PyObject* pyIn = static_cast(w); @@ -191,7 +191,7 @@ void registerTypes() isBaseQuantity_PythonToCpp_QVariantConvertible); } -#if QT_VERSION >= 0x050200 +#if defined (HAVE_PYSIDE) && QT_VERSION >= 0x050200 QMetaType::registerConverter(&convertWrapperToQuantity); #endif }