Fix wrong displayed category name in EditorHelpSearch

This commit is contained in:
Haoyu Qiu 2024-09-21 00:07:11 +08:00
parent 2be730a05b
commit aa4f7bc2e3
2 changed files with 3 additions and 3 deletions

View File

@ -530,7 +530,7 @@ bool EditorHelpSearch::Runner::_phase_fill_member_items_init() {
return true;
}
TreeItem *EditorHelpSearch::Runner::_create_category_item(TreeItem *p_parent, const String &p_class, const StringName &p_icon, const String &p_metatype, const String &p_text) {
TreeItem *EditorHelpSearch::Runner::_create_category_item(TreeItem *p_parent, const String &p_class, const StringName &p_icon, const String &p_text, const String &p_metatype) {
const String item_meta = "class_" + p_metatype + ":" + p_class;
TreeItem *item = nullptr;
@ -620,7 +620,7 @@ bool EditorHelpSearch::Runner::_phase_fill_member_items() {
if ((search_flags & SEARCH_PROPERTIES) && !class_doc->properties.is_empty()) {
TreeItem *parent_item = item;
if (search_all) {
parent_item = _create_category_item(parent_item, class_doc->name, SNAME("MemberProperty"), TTRC("Prtoperties"), "propertiess");
parent_item = _create_category_item(parent_item, class_doc->name, SNAME("MemberProperty"), TTRC("Properties"), "properties");
}
for (const DocData::PropertyDoc &property_doc : class_doc->properties) {
_create_property_item(parent_item, class_doc, &property_doc);

View File

@ -198,7 +198,7 @@ class EditorHelpSearch::Runner : public RefCounted {
TreeItem *_create_class_hierarchy(const ClassMatch &p_match);
TreeItem *_create_class_hierarchy(const DocData::ClassDoc *p_class_doc, const String &p_matching_keyword, bool p_gray);
TreeItem *_create_class_item(TreeItem *p_parent, const DocData::ClassDoc *p_doc, bool p_gray, const String &p_matching_keyword);
TreeItem *_create_category_item(TreeItem *p_parent, const String &p_class, const StringName &p_icon, const String &p_metatype, const String &p_type);
TreeItem *_create_category_item(TreeItem *p_parent, const String &p_class, const StringName &p_icon, const String &p_text, const String &p_metatype);
TreeItem *_create_method_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const MemberMatch<DocData::MethodDoc> &p_match);
TreeItem *_create_constructor_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const MemberMatch<DocData::MethodDoc> &p_match);
TreeItem *_create_operator_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const MemberMatch<DocData::MethodDoc> &p_match);