Merge pull request #11319 from neikeq/docdata-enum-proxy
DocData: Fix enums for proxy classes
This commit is contained in:
commit
61e9623ced
|
@ -170,6 +170,8 @@ static void return_doc_from_retinfo(DocData::MethodDoc &p_method, const Property
|
||||||
|
|
||||||
if (p_retinfo.type == Variant::INT && p_retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
|
if (p_retinfo.type == Variant::INT && p_retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
|
||||||
p_method.return_enum = p_retinfo.class_name;
|
p_method.return_enum = p_retinfo.class_name;
|
||||||
|
if (p_method.return_enum.begins_with("_")) //proxy class
|
||||||
|
p_method.return_enum = p_method.return_enum.substr(1, p_method.return_enum.length());
|
||||||
p_method.return_type = "int";
|
p_method.return_type = "int";
|
||||||
} else if (p_retinfo.class_name != StringName()) {
|
} else if (p_retinfo.class_name != StringName()) {
|
||||||
p_method.return_type = p_retinfo.class_name;
|
p_method.return_type = p_retinfo.class_name;
|
||||||
|
@ -190,6 +192,8 @@ static void argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const Pr
|
||||||
|
|
||||||
if (p_arginfo.type == Variant::INT && p_arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
|
if (p_arginfo.type == Variant::INT && p_arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
|
||||||
p_argument.enumeration = p_arginfo.class_name;
|
p_argument.enumeration = p_arginfo.class_name;
|
||||||
|
if (p_argument.enumeration.begins_with("_")) //proxy class
|
||||||
|
p_argument.enumeration = p_argument.enumeration.substr(1, p_argument.enumeration.length());
|
||||||
p_argument.type = "int";
|
p_argument.type = "int";
|
||||||
} else if (p_arginfo.class_name != StringName()) {
|
} else if (p_arginfo.class_name != StringName()) {
|
||||||
p_argument.type = p_arginfo.class_name;
|
p_argument.type = p_arginfo.class_name;
|
||||||
|
|
Loading…
Reference in New Issue