Don't show attribute 'Type' in call tips any more
This commit is contained in:
parent
313866ee63
commit
6a9594d4c0
|
@ -24,12 +24,6 @@
|
|||
<UserDocu>Returns all descentences</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="Type" ReadOnly="true">
|
||||
<Documentation>
|
||||
<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>
|
||||
|
|
|
@ -68,13 +68,6 @@ PyObject* BaseClassPy::getAllDerivedFrom(PyObject *args)
|
|||
return Py::new_reference_to(res);
|
||||
}
|
||||
|
||||
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()));
|
||||
|
@ -85,8 +78,15 @@ Py::Int BaseClassPy::getModule(void) const
|
|||
return Py::Int();
|
||||
}
|
||||
|
||||
PyObject *BaseClassPy::getCustomAttributes(const char* /*attr*/) const
|
||||
PyObject *BaseClassPy::getCustomAttributes(const char* attr) const
|
||||
{
|
||||
// this attribute is marked 'deprecated' but to keep old code working we
|
||||
// handle it here. In a future version this will be removed.
|
||||
if (strcmp(attr, "Type") == 0) {
|
||||
PyErr_SetString(PyExc_DeprecationWarning, "Use 'TypeId' instead");
|
||||
PyErr_Print();
|
||||
return Py::new_reference_to(Py::String(std::string(getBaseClassPtr()->getTypeId().getName())));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user