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 /editor/quick_open.cpp | |
parent | a439131c2b06b3d452e5be13530b6d2caa72c1aa (diff) |
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 'editor/quick_open.cpp')
-rw-r--r-- | editor/quick_open.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index 57e3c1da70..0214fc6bfc 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -257,7 +257,7 @@ void EditorQuickOpen::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - connect_compat("confirmed", this, "_confirmed"); + connect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed)); search_box->set_clear_button_enabled(true); [[fallthrough]]; @@ -266,7 +266,7 @@ void EditorQuickOpen::_notification(int p_what) { search_box->set_right_icon(get_icon("Search", "EditorIcons")); } break; case NOTIFICATION_EXIT_TREE: { - disconnect_compat("confirmed", this, "_confirmed"); + disconnect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed)); } break; } } @@ -278,10 +278,6 @@ StringName EditorQuickOpen::get_base_type() const { void EditorQuickOpen::_bind_methods() { - ClassDB::bind_method(D_METHOD("_text_changed"), &EditorQuickOpen::_text_changed); - ClassDB::bind_method(D_METHOD("_confirmed"), &EditorQuickOpen::_confirmed); - ClassDB::bind_method(D_METHOD("_sbox_input"), &EditorQuickOpen::_sbox_input); - ADD_SIGNAL(MethodInfo("quick_open")); } @@ -291,15 +287,15 @@ EditorQuickOpen::EditorQuickOpen() { add_child(vbc); search_box = memnew(LineEdit); vbc->add_margin_child(TTR("Search:"), search_box); - search_box->connect_compat("text_changed", this, "_text_changed"); - search_box->connect_compat("gui_input", this, "_sbox_input"); + search_box->connect("text_changed", callable_mp(this, &EditorQuickOpen::_text_changed)); + search_box->connect("gui_input", callable_mp(this, &EditorQuickOpen::_sbox_input)); search_options = memnew(Tree); vbc->add_margin_child(TTR("Matches:"), search_options, true); get_ok()->set_text(TTR("Open")); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); - search_options->connect_compat("item_activated", this, "_confirmed"); + search_options->connect("item_activated", callable_mp(this, &EditorQuickOpen::_confirmed)); search_options->set_hide_root(true); search_options->set_hide_folding(true); search_options->add_constant_override("draw_guides", 1); |