Merge pull request #105700 from dementive/config-file-get-improvement

Improve ConfigFile get_sections and get_section_keys by returning Vector<String>
This commit is contained in:
Thaddeus Crews 2025-04-27 19:21:31 -05:00
commit f8a8d6cf04
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
20 changed files with 58 additions and 105 deletions

View file

@ -1649,8 +1649,7 @@ void EditorNode::_load_editor_plugin_states_from_config(const Ref<ConfigFile> &p
return;
}
List<String> esl;
p_config_file->get_section_keys("editor_states", &esl);
Vector<String> esl = p_config_file->get_section_keys("editor_states");
Dictionary md;
for (const String &E : esl) {
@ -2379,8 +2378,7 @@ void EditorNode::_dialog_action(String p_file) {
}
// Erase key values.
List<String> keys;
config->get_section_keys(p_file, &keys);
Vector<String> keys = config->get_section_keys(p_file);
for (const String &key : keys) {
config->set_value(p_file, key, Variant());
}
@ -5778,8 +5776,7 @@ void EditorNode::_update_layouts_menu() {
return; // No config.
}
List<String> layouts;
config.ptr()->get_sections(&layouts);
Vector<String> layouts = config->get_sections();
for (const String &layout : layouts) {
if (layout == TTR("Default")) {