1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Signals: Port more uses of connect_compat

Those were problematic as they call a method of their parent class,
but callable_mp does not allow that unless it's public.

To solve it, we declare a local class that calls the parent class'
method, which now needs to be protected to be accessible in the
derived class.
This commit is contained in:
Rémi Verschelde
2020-02-27 22:49:16 +01:00
parent b8f08b42e7
commit 09a6a2d8f8
19 changed files with 79 additions and 41 deletions

View File

@@ -945,7 +945,10 @@ void ProjectExportDialog::_export_project() {
}
}
// Ensure that signal is connected if previous attempt left it disconnected with _validate_export_path
// Ensure that signal is connected if previous attempt left it disconnected
// with _validate_export_path.
// FIXME: This is a hack, we should instead change EditorFileDialog to allow
// disabling validation by the "text_entered" signal.
if (!export_project->get_line_edit()->is_connected_compat("text_entered", export_project, "_file_entered")) {
export_project->get_ok()->set_disabled(false);
export_project->get_line_edit()->connect_compat("text_entered", export_project, "_file_entered");