Material: QMetaType::type(const char*) is deprecatred and shouldn't be used in new code

This commit is contained in:
wmayer
2023-09-29 11:05:07 +02:00
parent 0eb789a1e2
commit f4c6504aa1

View File

@@ -346,7 +346,7 @@ static PyObject* _pyObjectFromVariant(const QVariant& value)
return new PyObject();
}
if (value.userType() == QMetaType::type("Base::Quantity")) {
if (value.userType() == qMetaTypeId<Base::Quantity>()) {
return new Base::QuantityPy(new Base::Quantity(value.value<Base::Quantity>()));
}
else if (value.userType() == QMetaType::Double) {