Merge pull request #67445 from Zylann/rename_queue_delete

Rename queue_delete => queue_free
This commit is contained in:
Rémi Verschelde 2022-10-31 10:51:18 +01:00
commit 420eb1aa34
No known key found for this signature in database
GPG key ID: C3336907360768E1
29 changed files with 55 additions and 55 deletions

View file

@ -1036,7 +1036,7 @@ void EditorAudioBuses::_notification(int p_what) {
case NOTIFICATION_DRAG_END: {
if (drop_end) {
drop_end->queue_delete();
drop_end->queue_free();
drop_end = nullptr;
}
} break;

View file

@ -527,7 +527,7 @@ void EditorAutoloadSettings::update_autoload() {
}
if (info.node) {
info.node->queue_delete();
info.node->queue_free();
info.node = nullptr;
}

View file

@ -4534,7 +4534,7 @@ void EditorNode::_dock_floating_close_request(Control *p_control) {
dock_slot[window_slot]->move_child(p_control, MIN((int)window->get_meta("dock_index"), dock_slot[window_slot]->get_tab_count()));
dock_slot[window_slot]->set_current_tab(window->get_meta("dock_index"));
window->queue_delete();
window->queue_free();
_update_dock_containers();

View file

@ -293,7 +293,7 @@ void EditorPropertyArray::update_property() {
continue; // Don't remove the property that the user is moving.
}
child->queue_delete(); // Button still needed after pressed is called.
child->queue_free(); // Button still needed after pressed is called.
property_vbox->remove_child(child);
}
}
@ -861,7 +861,7 @@ void EditorPropertyDictionary::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
property_vbox->get_child(i)->queue_delete();
property_vbox->get_child(i)->queue_free();
}
}
@ -1349,7 +1349,7 @@ void EditorPropertyLocalizableString::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
property_vbox->get_child(i)->queue_delete();
property_vbox->get_child(i)->queue_free();
}
}

View file

@ -231,7 +231,7 @@ void EditorToaster::_auto_hide_or_free_toasts() {
// Delete the control right away (removed as child) as it might cause issues otherwise when iterative over the vbox_container children.
for (unsigned int i = 0; i < to_delete.size(); i++) {
vbox_container->remove_child(to_delete[i]);
to_delete[i]->queue_delete();
to_delete[i]->queue_free();
toasts.erase(to_delete[i]);
}

View file

@ -464,7 +464,7 @@ void FindInFilesDialog::_notification(int p_what) {
_search_text_line_edit->select_all();
// Extensions might have changed in the meantime, we clean them and instance them again.
for (int i = 0; i < _filters_container->get_child_count(); i++) {
_filters_container->get_child(i)->queue_delete();
_filters_container->get_child(i)->queue_free();
}
Array exts = ProjectSettings::get_singleton()->get("editor/script/search_in_file_extensions");
for (int i = 0; i < exts.size(); ++i) {

View file

@ -460,7 +460,7 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
void EditorAssetLibraryItemDownload::_close() {
// Clean up downloaded file.
DirAccess::remove_file_or_error(download->get_download_file());
queue_delete();
queue_free();
}
bool EditorAssetLibraryItemDownload::can_install() const {
@ -832,7 +832,7 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons
}
}
image_queue[p_queue_id].request->queue_delete();
image_queue[p_queue_id].request->queue_free();
image_queue.erase(p_queue_id);
_update_image_queue();
@ -868,7 +868,7 @@ void EditorAssetLibrary::_update_image_queue() {
}
while (to_delete.size()) {
image_queue[to_delete.front()->get()].request->queue_delete();
image_queue[to_delete.front()->get()].request->queue_free();
image_queue.erase(to_delete.front()->get());
to_delete.pop_front();
}

View file

@ -5543,7 +5543,7 @@ void CanvasItemEditorViewport::_remove_preview() {
if (preview_node->get_parent()) {
for (int i = preview_node->get_child_count() - 1; i >= 0; i--) {
Node *node = preview_node->get_child(i);
node->queue_delete();
node->queue_free();
preview_node->remove_child(node);
}
EditorNode::get_singleton()->get_scene_root()->remove_child(preview_node);

View file

@ -260,7 +260,7 @@ void EditorPropertyFontMetaOverride::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
property_vbox->get_child(i)->queue_delete();
property_vbox->get_child(i)->queue_free();
}
button_add = nullptr;
}
@ -457,7 +457,7 @@ void EditorPropertyOTVariation::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
property_vbox->get_child(i)->queue_delete();
property_vbox->get_child(i)->queue_free();
}
}
@ -662,7 +662,7 @@ void EditorPropertyOTFeatures::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
property_vbox->get_child(i)->queue_delete();
property_vbox->get_child(i)->queue_free();
}
button_add = nullptr;
}

View file

@ -3862,7 +3862,7 @@ void Node3DEditorViewport::_remove_preview_node() {
if (preview_node->get_parent()) {
for (int i = preview_node->get_child_count() - 1; i >= 0; i--) {
Node *node = preview_node->get_child(i);
node->queue_delete();
node->queue_free();
preview_node->remove_child(node);
}
EditorNode::get_singleton()->get_scene_root()->remove_child(preview_node);

View file

@ -1082,7 +1082,7 @@ void Skeleton3DEditor::select_bone(int p_idx) {
Skeleton3DEditor::~Skeleton3DEditor() {
singleton = nullptr;
handles_mesh_instance->queue_delete();
handles_mesh_instance->queue_free();
Node3DEditor *ne = Node3DEditor::get_singleton();

View file

@ -2481,7 +2481,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = color_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = color_items_list->get_child(i);
node->queue_delete();
node->queue_free();
color_items_list->remove_child(node);
}
@ -2510,7 +2510,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = constant_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = constant_items_list->get_child(i);
node->queue_delete();
node->queue_free();
constant_items_list->remove_child(node);
}
@ -2543,7 +2543,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = font_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = font_items_list->get_child(i);
node->queue_delete();
node->queue_free();
font_items_list->remove_child(node);
}
@ -2581,7 +2581,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = font_size_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = font_size_items_list->get_child(i);
node->queue_delete();
node->queue_free();
font_size_items_list->remove_child(node);
}
@ -2614,7 +2614,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = icon_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = icon_items_list->get_child(i);
node->queue_delete();
node->queue_free();
icon_items_list->remove_child(node);
}
@ -2652,7 +2652,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = stylebox_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = stylebox_items_list->get_child(i);
node->queue_delete();
node->queue_free();
stylebox_items_list->remove_child(node);
}

View file

@ -459,7 +459,7 @@ void SceneThemeEditorPreview::_reload_scene() {
for (int i = preview_content->get_child_count() - 1; i >= 0; i--) {
Node *node = preview_content->get_child(i);
node->queue_delete();
node->queue_free();
preview_content->remove_child(node);
}

View file

@ -1141,7 +1141,7 @@ void TileDataDefaultEditor::setup_property_editor(Variant::Type p_type, String p
// Update everything.
if (property_editor) {
property_editor->queue_delete();
property_editor->queue_free();
}
// Update the dummy object.
@ -1200,7 +1200,7 @@ TileDataDefaultEditor::TileDataDefaultEditor() {
}
TileDataDefaultEditor::~TileDataDefaultEditor() {
toolbar->queue_delete();
toolbar->queue_free();
memdelete(dummy_object);
}
@ -1403,11 +1403,11 @@ void TileDataCollisionEditor::_polygons_changed() {
dummy_object->remove_dummy_property(vformat("polygon_%d_one_way_margin", i));
}
for (int i = polygon_editor->get_polygon_count(); property_editors.has(vformat("polygon_%d_one_way", i)); i++) {
property_editors[vformat("polygon_%d_one_way", i)]->queue_delete();
property_editors[vformat("polygon_%d_one_way", i)]->queue_free();
property_editors.erase(vformat("polygon_%d_one_way", i));
}
for (int i = polygon_editor->get_polygon_count(); property_editors.has(vformat("polygon_%d_one_way_margin", i)); i++) {
property_editors[vformat("polygon_%d_one_way_margin", i)]->queue_delete();
property_editors[vformat("polygon_%d_one_way_margin", i)]->queue_free();
property_editors.erase(vformat("polygon_%d_one_way_margin", i));
}
}
@ -2658,7 +2658,7 @@ TileDataTerrainsEditor::TileDataTerrainsEditor() {
}
TileDataTerrainsEditor::~TileDataTerrainsEditor() {
toolbar->queue_delete();
toolbar->queue_free();
memdelete(dummy_object);
}

View file

@ -671,7 +671,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
}
}
for (int i = tile_set->get_occlusion_layers_count(); tile_data_editors.has(vformat("occlusion_layer_%d", i)); i++) {
tile_data_editors[vformat("occlusion_layer_%d", i)]->queue_delete();
tile_data_editors[vformat("occlusion_layer_%d", i)]->queue_free();
tile_data_editors.erase(vformat("occlusion_layer_%d", i));
}
@ -710,7 +710,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
}
}
for (int i = tile_set->get_physics_layers_count(); tile_data_editors.has(vformat("physics_layer_%d", i)); i++) {
tile_data_editors[vformat("physics_layer_%d", i)]->queue_delete();
tile_data_editors[vformat("physics_layer_%d", i)]->queue_free();
tile_data_editors.erase(vformat("physics_layer_%d", i));
}
@ -728,7 +728,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
}
}
for (int i = tile_set->get_navigation_layers_count(); tile_data_editors.has(vformat("navigation_layer_%d", i)); i++) {
tile_data_editors[vformat("navigation_layer_%d", i)]->queue_delete();
tile_data_editors[vformat("navigation_layer_%d", i)]->queue_free();
tile_data_editors.erase(vformat("navigation_layer_%d", i));
}
@ -750,7 +750,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
}
}
for (int i = tile_set->get_custom_data_layers_count(); tile_data_editors.has(vformat("custom_data_%d", i)); i++) {
tile_data_editors[vformat("custom_data_%d", i)]->queue_delete();
tile_data_editors[vformat("custom_data_%d", i)]->queue_free();
tile_data_editors.erase(vformat("custom_data_%d", i));
}
@ -884,7 +884,7 @@ void TileSetAtlasSourceEditor::_update_atlas_view() {
// Create a bunch of buttons to add alternative tiles.
for (int i = 0; i < alternative_tiles_control->get_child_count(); i++) {
alternative_tiles_control->get_child(i)->queue_delete();
alternative_tiles_control->get_child(i)->queue_free();
}
Vector2i pos;

View file

@ -131,7 +131,7 @@ void TilesEditorPlugin::_thread() {
Callable::CallError error;
item.callback.callp(args_ptr, 2, r, error);
viewport->queue_delete();
viewport->queue_free();
}
}
}

View file

@ -3266,7 +3266,7 @@ void SceneTreeDock::_update_create_root_dialog() {
EditorSettings::get_singleton()->save();
if (node_shortcuts_toggle->is_pressed()) {
for (int i = 0; i < favorite_node_shortcuts->get_child_count(); i++) {
favorite_node_shortcuts->get_child(i)->queue_delete();
favorite_node_shortcuts->get_child(i)->queue_free();
}
Ref<FileAccess> f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().path_join("favorites.Node"), FileAccess::READ);

View file

@ -72,7 +72,7 @@ void SceneReplicationInterface::_free_remotes(const PeerInfo &p_info) {
for (const KeyValue<uint32_t, ObjectID> &E : p_info.recv_nodes) {
Node *node = tracked_nodes.has(E.value) ? get_id_as<Node>(E.value) : nullptr;
ERR_CONTINUE(!node);
node->queue_delete();
node->queue_free();
}
}
@ -581,7 +581,7 @@ Error SceneReplicationInterface::on_despawn_receive(int p_from, const uint8_t *p
if (node->get_parent() != nullptr) {
node->get_parent()->remove_child(node);
}
node->queue_delete();
node->queue_free();
spawner->emit_signal(SNAME("despawned"), node);
return OK;

View file

@ -128,7 +128,7 @@ void OpenXRActionMapEditor::_update_interaction_profiles() {
interaction_profiles.remove_at(0);
tabs->remove_child(interaction_profile);
interaction_profile->queue_delete();
interaction_profile->queue_free();
}
// in with the new...
@ -205,7 +205,7 @@ void OpenXRActionMapEditor::_on_remove_action_set(Object *p_action_set_editor) {
action_map->remove_action_set(action_set);
actionsets_vb->remove_child(action_set_editor);
action_set_editor->queue_delete();
action_set_editor->queue_free();
}
void OpenXRActionMapEditor::_on_action_removed() {
@ -290,7 +290,7 @@ void OpenXRActionMapEditor::_on_tab_button_pressed(int p_tab) {
action_map->remove_interaction_profile(interaction_profile);
tabs->remove_child(profile_editor);
profile_editor->queue_delete();
profile_editor->queue_free();
}
void OpenXRActionMapEditor::open_action_map(String p_path) {

View file

@ -140,7 +140,7 @@ void OpenXRActionSetEditor::_on_remove_action(Object *p_action_editor) {
// And remove it....
action_map->remove_action(action->get_name_with_set()); // remove it from the set and any interaction profile it relates to
actions_vb->remove_child(action_editor);
action_editor->queue_delete();
action_editor->queue_free();
// Let action map editor know so we can update our interaction profiles
emit_signal("action_removed");

View file

@ -1863,7 +1863,7 @@ void TileMap::_scenes_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r_
for (const KeyValue<Vector2i, String> &E : q.scenes) {
Node *node = get_node_or_null(E.value);
if (node) {
node->queue_delete();
node->queue_free();
}
}
@ -1911,7 +1911,7 @@ void TileMap::_scenes_cleanup_quadrant(TileMapQuadrant *p_quadrant) {
for (const KeyValue<Vector2i, String> &E : p_quadrant->scenes) {
Node *node = get_node_or_null(E.value);
if (node) {
node->queue_delete();
node->queue_free();
}
}

View file

@ -516,7 +516,7 @@ void RayCast3D::_clear_debug_shape() {
MeshInstance3D *mi = static_cast<MeshInstance3D *>(debug_shape);
if (mi->is_inside_tree()) {
mi->queue_delete();
mi->queue_free();
} else {
memdelete(mi);
}

View file

@ -619,7 +619,7 @@ void ShapeCast3D::_clear_debug_shape() {
MeshInstance3D *mi = static_cast<MeshInstance3D *>(debug_shape);
if (mi->is_inside_tree()) {
mi->queue_delete();
mi->queue_free();
} else {
memdelete(mi);
}

View file

@ -2066,7 +2066,7 @@ Ref<AnimatedValuesBackup> AnimationPlayer::apply_reset(bool p_user_initiated) {
// Forcing the use of the original root because the scene where original player belongs may be not the active one
Ref<AnimatedValuesBackup> old_values = aux_player->backup_animated_values(get_node(get_root()));
aux_player->seek(0.0f, true);
aux_player->queue_delete();
aux_player->queue_free();
if (p_user_initiated) {
Ref<AnimatedValuesBackup> new_values = aux_player->backup_animated_values();

View file

@ -744,7 +744,7 @@ void ColorPicker::add_recent_preset(const Color &p_color) {
if (recent_preset_hbc->get_child_count() >= PRESET_COLUMN_COUNT) {
recent_preset_cache.pop_front();
recent_presets.pop_front();
recent_preset_hbc->get_child(PRESET_COLUMN_COUNT - 1)->queue_delete();
recent_preset_hbc->get_child(PRESET_COLUMN_COUNT - 1)->queue_free();
}
recent_presets.push_back(p_color);
recent_preset_cache.push_back(p_color);
@ -770,7 +770,7 @@ void ColorPicker::erase_preset(const Color &p_color) {
for (int i = 1; i < preset_container->get_child_count(); i++) {
ColorPresetButton *current_btn = Object::cast_to<ColorPresetButton>(preset_container->get_child(i));
if (current_btn && p_color == current_btn->get_preset_color()) {
current_btn->queue_delete();
current_btn->queue_free();
break;
}
}
@ -794,7 +794,7 @@ void ColorPicker::erase_recent_preset(const Color &p_color) {
for (int i = 1; i < recent_preset_hbc->get_child_count(); i++) {
ColorPresetButton *current_btn = Object::cast_to<ColorPresetButton>(recent_preset_hbc->get_child(i));
if (current_btn && p_color == current_btn->get_preset_color()) {
current_btn->queue_delete();
current_btn->queue_free();
break;
}
}

View file

@ -100,7 +100,7 @@ Node *InstancePlaceholder::create_instance(bool p_replace, const Ref<PackedScene
}
if (p_replace) {
queue_delete();
queue_free();
base->remove_child(this);
}

View file

@ -2580,7 +2580,7 @@ void Node::print_orphan_nodes() {
#endif
}
void Node::queue_delete() {
void Node::queue_free() {
if (is_inside_tree()) {
get_tree()->queue_delete(this);
} else {
@ -2822,7 +2822,7 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_viewport"), &Node::get_viewport);
ClassDB::bind_method(D_METHOD("queue_free"), &Node::queue_delete);
ClassDB::bind_method(D_METHOD("queue_free"), &Node::queue_free);
ClassDB::bind_method(D_METHOD("request_ready"), &Node::request_ready);

View file

@ -460,7 +460,7 @@ public:
#endif
static String adjust_name_casing(const String &p_name);
void queue_delete();
void queue_free();
//hacks for speed
static void init_node_hrcr();

View file

@ -1161,7 +1161,7 @@ void Viewport::_gui_cancel_tooltip() {
gui.tooltip_timer = Ref<SceneTreeTimer>();
}
if (gui.tooltip_popup) {
gui.tooltip_popup->queue_delete();
gui.tooltip_popup->queue_free();
}
}