diff --git a/editor/gui/editor_quick_open_dialog.cpp b/editor/gui/editor_quick_open_dialog.cpp index 3d15cd2dd58..51fee24b4bf 100644 --- a/editor/gui/editor_quick_open_dialog.cpp +++ b/editor/gui/editor_quick_open_dialog.cpp @@ -788,10 +788,10 @@ String QuickOpenResultContainer::get_selected() const { QuickOpenDisplayMode QuickOpenResultContainer::get_adaptive_display_mode(const Vector &p_base_types) { static const Vector grid_preferred_types = { - "Font", - "Texture2D", - "Material", - "Mesh" + StringName("Font", true), + StringName("Texture2D", true), + StringName("Material", true), + StringName("Mesh", true), }; for (const StringName &type : grid_preferred_types) { diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 916e163e9b8..badb28ba083 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1972,12 +1972,26 @@ void SceneTree::add_idle_callback(IdleCallback p_callback) { #ifdef TOOLS_ENABLED void SceneTree::get_argument_options(const StringName &p_function, int p_idx, List *r_options) const { - const String pf = p_function; bool add_options = false; if (p_idx == 0) { - add_options = pf == "get_nodes_in_group" || pf == "has_group" || pf == "get_first_node_in_group" || pf == "set_group" || pf == "notify_group" || pf == "call_group" || pf == "add_to_group"; + static const Vector names = { + StringName("add_to_group", true), + StringName("call_group", true), + StringName("get_first_node_in_group", true), + StringName("get_node_count_in_group", true), + StringName("get_nodes_in_group", true), + StringName("has_group", true), + StringName("notify_group", true), + StringName("set_group", true), + }; + add_options = names.has(p_function); } else if (p_idx == 1) { - add_options = pf == "set_group_flags" || pf == "call_group_flags" || pf == "notify_group_flags"; + static const Vector names = { + StringName("call_group_flags", true), + StringName("notify_group_flags", true), + StringName("set_group_flags", true), + }; + add_options = names.has(p_function); } if (add_options) { HashMap global_groups = ProjectSettings::get_singleton()->get_global_groups_list();