summaryrefslogtreecommitdiff
path: root/editor/editor_autoload_settings.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-21 18:28:45 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-28 14:24:09 +0100
commit01afc442c73661df677c2b93f4037a21992ee45b (patch)
tree9a5b0b68cb022873ba31929fe6a785ddf5c0555c /editor/editor_autoload_settings.cpp
parenta439131c2b06b3d452e5be13530b6d2caa72c1aa (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/editor_autoload_settings.cpp')
-rw-r--r--editor/editor_autoload_settings.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index feb6dbd302..83a1e2fca2 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -736,16 +736,7 @@ void EditorAutoloadSettings::autoload_remove(const String &p_name) {
void EditorAutoloadSettings::_bind_methods() {
- ClassDB::bind_method("_autoload_add", &EditorAutoloadSettings::_autoload_add);
- ClassDB::bind_method("_autoload_selected", &EditorAutoloadSettings::_autoload_selected);
- ClassDB::bind_method("_autoload_edited", &EditorAutoloadSettings::_autoload_edited);
- ClassDB::bind_method("_autoload_button_pressed", &EditorAutoloadSettings::_autoload_button_pressed);
- ClassDB::bind_method("_autoload_activated", &EditorAutoloadSettings::_autoload_activated);
- ClassDB::bind_method("_autoload_path_text_changed", &EditorAutoloadSettings::_autoload_path_text_changed);
- ClassDB::bind_method("_autoload_text_entered", &EditorAutoloadSettings::_autoload_text_entered);
- ClassDB::bind_method("_autoload_text_changed", &EditorAutoloadSettings::_autoload_text_changed);
ClassDB::bind_method("_autoload_open", &EditorAutoloadSettings::_autoload_open);
- ClassDB::bind_method("_autoload_file_callback", &EditorAutoloadSettings::_autoload_file_callback);
ClassDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
@@ -835,8 +826,8 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
autoload_add_path = memnew(EditorLineEditFileChooser);
autoload_add_path->set_h_size_flags(SIZE_EXPAND_FILL);
autoload_add_path->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- autoload_add_path->get_file_dialog()->connect_compat("file_selected", this, "_autoload_file_callback");
- autoload_add_path->get_line_edit()->connect_compat("text_changed", this, "_autoload_path_text_changed");
+ autoload_add_path->get_file_dialog()->connect("file_selected", callable_mp(this, &EditorAutoloadSettings::_autoload_file_callback));
+ autoload_add_path->get_line_edit()->connect("text_changed", callable_mp(this, &EditorAutoloadSettings::_autoload_path_text_changed));
hbc->add_child(autoload_add_path);
@@ -846,13 +837,13 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
autoload_add_name = memnew(LineEdit);
autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL);
- autoload_add_name->connect_compat("text_entered", this, "_autoload_text_entered");
- autoload_add_name->connect_compat("text_changed", this, "_autoload_text_changed");
+ autoload_add_name->connect("text_entered", callable_mp(this, &EditorAutoloadSettings::_autoload_text_entered));
+ autoload_add_name->connect("text_changed", callable_mp(this, &EditorAutoloadSettings::_autoload_text_changed));
hbc->add_child(autoload_add_name);
add_autoload = memnew(Button);
add_autoload->set_text(TTR("Add"));
- add_autoload->connect_compat("pressed", this, "_autoload_add");
+ add_autoload->connect("pressed", callable_mp(this, &EditorAutoloadSettings::_autoload_add));
// The button will be enabled once a valid name is entered (either automatically or manually).
add_autoload->set_disabled(true);
hbc->add_child(add_autoload);
@@ -882,10 +873,10 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
tree->set_column_expand(3, false);
tree->set_column_min_width(3, 120 * EDSCALE);
- tree->connect_compat("cell_selected", this, "_autoload_selected");
- tree->connect_compat("item_edited", this, "_autoload_edited");
- tree->connect_compat("button_pressed", this, "_autoload_button_pressed");
- tree->connect_compat("item_activated", this, "_autoload_activated");
+ tree->connect("cell_selected", callable_mp(this, &EditorAutoloadSettings::_autoload_selected));
+ tree->connect("item_edited", callable_mp(this, &EditorAutoloadSettings::_autoload_edited));
+ tree->connect("button_pressed", callable_mp(this, &EditorAutoloadSettings::_autoload_button_pressed));
+ tree->connect("item_activated", callable_mp(this, &EditorAutoloadSettings::_autoload_activated));
tree->set_v_size_flags(SIZE_EXPAND_FILL);
add_child(tree, true);