diff options
author | Xwdit <xwditfr@gmail.com> | 2022-07-17 07:26:57 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-07-24 23:00:19 +0200 |
commit | 5d49df8d97f4e7c0cafae80115f784f1d0e97044 (patch) | |
tree | 70cefd179cbbc71ad748ad2448e733a4d0769c39 /editor | |
parent | b50acebd48d7e45a1444e553a5ea9878ef87592a (diff) |
Fix missing method qualifiers in script doc
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'editor')
-rw-r--r-- | editor/doc_tools.cpp | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index a6c7970264..773fcc5017 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -498,53 +498,7 @@ void DocTools::generate(bool p_basic_types) { } DocData::MethodDoc method; - - method.name = E.name; - - if (E.flags & METHOD_FLAG_VIRTUAL) { - method.qualifiers = "virtual"; - } - - if (E.flags & METHOD_FLAG_CONST) { - if (!method.qualifiers.is_empty()) { - method.qualifiers += " "; - } - method.qualifiers += "const"; - } - - if (E.flags & METHOD_FLAG_VARARG) { - if (!method.qualifiers.is_empty()) { - method.qualifiers += " "; - } - method.qualifiers += "vararg"; - } - - if (E.flags & METHOD_FLAG_STATIC) { - if (!method.qualifiers.is_empty()) { - method.qualifiers += " "; - } - method.qualifiers += "static"; - } - - for (int i = -1; i < E.arguments.size(); i++) { - if (i == -1) { -#ifdef DEBUG_METHODS_ENABLED - DocData::return_doc_from_retinfo(method, E.return_val); -#endif - } else { - const PropertyInfo &arginfo = E.arguments[i]; - DocData::ArgumentDoc argument; - DocData::argument_doc_from_arginfo(argument, arginfo); - - int darg_idx = i - (E.arguments.size() - E.default_arguments.size()); - if (darg_idx >= 0) { - Variant default_arg = E.default_arguments[darg_idx]; - argument.default_value = default_arg.get_construct_string().replace("\n", " "); - } - - method.arguments.push_back(argument); - } - } + DocData::method_doc_from_methodinfo(method, E, ""); Vector<Error> errs = ClassDB::get_method_error_return_values(name, E.name); if (errs.size()) { |