diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-21 18:28:45 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-28 14:24:09 +0100 |
commit | 01afc442c73661df677c2b93f4037a21992ee45b (patch) | |
tree | 9a5b0b68cb022873ba31929fe6a785ddf5c0555c /modules/gdnative/gdnative_library_editor_plugin.cpp | |
parent | a439131c2b06b3d452e5be13530b6d2caa72c1aa (diff) | |
download | redot-engine-01afc442c73661df677c2b93f4037a21992ee45b.tar.gz |
Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.
No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
Diffstat (limited to 'modules/gdnative/gdnative_library_editor_plugin.cpp')
-rw-r--r-- | modules/gdnative/gdnative_library_editor_plugin.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index b434bc8385..db90199e63 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -53,14 +53,6 @@ void GDNativeLibraryEditor::edit(Ref<GDNativeLibrary> p_library) { } void GDNativeLibraryEditor::_bind_methods() { - - ClassDB::bind_method("_on_item_button", &GDNativeLibraryEditor::_on_item_button); - ClassDB::bind_method("_on_library_selected", &GDNativeLibraryEditor::_on_library_selected); - ClassDB::bind_method("_on_dependencies_selected", &GDNativeLibraryEditor::_on_dependencies_selected); - ClassDB::bind_method("_on_filter_selected", &GDNativeLibraryEditor::_on_filter_selected); - ClassDB::bind_method("_on_item_collapsed", &GDNativeLibraryEditor::_on_item_collapsed); - ClassDB::bind_method("_on_item_activated", &GDNativeLibraryEditor::_on_item_activated); - ClassDB::bind_method("_on_create_new_entry", &GDNativeLibraryEditor::_on_create_new_entry); } void GDNativeLibraryEditor::_update_tree() { @@ -359,7 +351,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { filter_list->set_item_checked(idx, true); idx += 1; } - filter_list->connect_compat("index_pressed", this, "_on_filter_selected"); + filter_list->connect("index_pressed", callable_mp(this, &GDNativeLibraryEditor::_on_filter_selected)); tree = memnew(Tree); container->add_child(tree); @@ -374,16 +366,16 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { tree->set_column_title(2, TTR("Dependencies")); tree->set_column_expand(3, false); tree->set_column_min_width(3, int(110 * EDSCALE)); - tree->connect_compat("button_pressed", this, "_on_item_button"); - tree->connect_compat("item_collapsed", this, "_on_item_collapsed"); - tree->connect_compat("item_activated", this, "_on_item_activated"); + tree->connect("button_pressed", callable_mp(this, &GDNativeLibraryEditor::_on_item_button)); + tree->connect("item_collapsed", callable_mp(this, &GDNativeLibraryEditor::_on_item_collapsed)); + tree->connect("item_activated", callable_mp(this, &GDNativeLibraryEditor::_on_item_activated)); file_dialog = memnew(EditorFileDialog); file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES); file_dialog->set_resizable(true); add_child(file_dialog); - file_dialog->connect_compat("file_selected", this, "_on_library_selected"); - file_dialog->connect_compat("files_selected", this, "_on_dependencies_selected"); + file_dialog->connect("file_selected", callable_mp(this, &GDNativeLibraryEditor::_on_library_selected)); + file_dialog->connect("files_selected", callable_mp(this, &GDNativeLibraryEditor::_on_dependencies_selected)); new_architecture_dialog = memnew(ConfirmationDialog); add_child(new_architecture_dialog); @@ -392,7 +384,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { new_architecture_dialog->add_child(new_architecture_input); new_architecture_dialog->set_custom_minimum_size(Vector2(300, 80) * EDSCALE); new_architecture_input->set_anchors_and_margins_preset(PRESET_HCENTER_WIDE, PRESET_MODE_MINSIZE, 5 * EDSCALE); - new_architecture_dialog->get_ok()->connect_compat("pressed", this, "_on_create_new_entry"); + new_architecture_dialog->get_ok()->connect("pressed", callable_mp(this, &GDNativeLibraryEditor::_on_create_new_entry)); } void GDNativeLibraryEditorPlugin::edit(Object *p_node) { |