Mark attribute 'Type' deprecated, use 'TypeId' now
This commit is contained in:
parent
e18dcef6db
commit
9ad4bb5595
|
@ -26,10 +26,16 @@
|
||||||
</Methode>
|
</Methode>
|
||||||
<Attribute Name="Type" ReadOnly="true">
|
<Attribute Name="Type" ReadOnly="true">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
<UserDocu>Is the type of the FreeCAD object with module domain</UserDocu>
|
<UserDocu>Is the type of the FreeCAD object with module domain (deprecated use TypeId)</UserDocu>
|
||||||
</Documentation>
|
</Documentation>
|
||||||
<Parameter Name="Type" Type="String" />
|
<Parameter Name="Type" Type="String" />
|
||||||
</Attribute>
|
</Attribute>
|
||||||
|
<Attribute Name="TypeId" ReadOnly="true">
|
||||||
|
<Documentation>
|
||||||
|
<UserDocu>Is the type of the FreeCAD object with module domain</UserDocu>
|
||||||
|
</Documentation>
|
||||||
|
<Parameter Name="TypeId" Type="String" />
|
||||||
|
</Attribute>
|
||||||
<Attribute Name="Module" ReadOnly="true">
|
<Attribute Name="Module" ReadOnly="true">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
<UserDocu>Module in which this class is defined</UserDocu>
|
<UserDocu>Module in which this class is defined</UserDocu>
|
||||||
|
|
|
@ -69,6 +69,13 @@ PyObject* BaseClassPy::getAllDerivedFrom(PyObject *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
Py::String BaseClassPy::getType(void) const
|
Py::String BaseClassPy::getType(void) const
|
||||||
|
{
|
||||||
|
PyErr_SetString(PyExc_DeprecationWarning, "Use 'TypeId' instead");
|
||||||
|
PyErr_Print();
|
||||||
|
return Py::String(std::string(getBaseClassPtr()->getTypeId().getName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
Py::String BaseClassPy::getTypeId(void) const
|
||||||
{
|
{
|
||||||
return Py::String(std::string(getBaseClassPtr()->getTypeId().getName()));
|
return Py::String(std::string(getBaseClassPtr()->getTypeId().getName()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user