You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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.)
This commit is contained in:
@@ -132,8 +132,8 @@ void PluginConfigDialog::_on_required_text_changed(const String &) {
|
||||
void PluginConfigDialog::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_READY: {
|
||||
connect_compat("confirmed", this, "_on_confirmed");
|
||||
get_cancel()->connect_compat("pressed", this, "_on_cancelled");
|
||||
connect("confirmed", callable_mp(this, &PluginConfigDialog::_on_confirmed));
|
||||
get_cancel()->connect("pressed", callable_mp(this, &PluginConfigDialog::_on_cancelled));
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_POST_POPUP: {
|
||||
@@ -175,9 +175,6 @@ void PluginConfigDialog::config(const String &p_config_path) {
|
||||
}
|
||||
|
||||
void PluginConfigDialog::_bind_methods() {
|
||||
ClassDB::bind_method("_on_required_text_changed", &PluginConfigDialog::_on_required_text_changed);
|
||||
ClassDB::bind_method("_on_confirmed", &PluginConfigDialog::_on_confirmed);
|
||||
ClassDB::bind_method("_on_cancelled", &PluginConfigDialog::_on_cancelled);
|
||||
ADD_SIGNAL(MethodInfo("plugin_ready", PropertyInfo(Variant::STRING, "script_path", PROPERTY_HINT_NONE, ""), PropertyInfo(Variant::STRING, "activate_name")));
|
||||
}
|
||||
|
||||
@@ -194,7 +191,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
||||
grid->add_child(name_lb);
|
||||
|
||||
name_edit = memnew(LineEdit);
|
||||
name_edit->connect_compat("text_changed", this, "_on_required_text_changed");
|
||||
name_edit->connect("text_changed", callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
|
||||
name_edit->set_placeholder("MyPlugin");
|
||||
grid->add_child(name_edit);
|
||||
|
||||
@@ -253,7 +250,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
||||
grid->add_child(script_lb);
|
||||
|
||||
script_edit = memnew(LineEdit);
|
||||
script_edit->connect_compat("text_changed", this, "_on_required_text_changed");
|
||||
script_edit->connect("text_changed", callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
|
||||
script_edit->set_placeholder("\"plugin.gd\" -> res://addons/my_plugin/plugin.gd");
|
||||
grid->add_child(script_edit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user