check for existence of PySide stuff when defining convertWrapperToQuantity
This commit is contained in:
@@ -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<PyObject*>(w);
|
||||
@@ -191,7 +191,7 @@ void registerTypes()
|
||||
isBaseQuantity_PythonToCpp_QVariantConvertible);
|
||||
}
|
||||
|
||||
#if QT_VERSION >= 0x050200
|
||||
#if defined (HAVE_PYSIDE) && QT_VERSION >= 0x050200
|
||||
QMetaType::registerConverter<PySide::PyObjectWrapper, Base::Quantity>(&convertWrapperToQuantity);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user