Mark attribute 'Type' deprecated, use 'TypeId' now
This commit is contained in:
parent
e18dcef6db
commit
9ad4bb5595
|
@ -26,10 +26,16 @@
|
|||
</Methode>
|
||||
<Attribute Name="Type" ReadOnly="true">
|
||||
<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>
|
||||
<Parameter Name="Type" Type="String" />
|
||||
</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">
|
||||
<Documentation>
|
||||
<UserDocu>Module in which this class is defined</UserDocu>
|
||||
|
|
|
@ -69,6 +69,13 @@ PyObject* BaseClassPy::getAllDerivedFrom(PyObject *args)
|
|||
}
|
||||
|
||||
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()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user