From 26ce86191014fa109052a8330e6f27546760ec73 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Tue, 12 Sep 2023 11:52:43 +0300 Subject: [PATCH] Editor: Remove unused Class Name field from Create Script dialog --- core/object/script_language.h | 2 + core/object/script_language_extension.cpp | 2 + core/object/script_language_extension.h | 2 + doc/classes/ScriptLanguageExtension.xml | 3 +- editor/script_create_dialog.cpp | 122 +++--------------- editor/script_create_dialog.h | 13 +- .../CharacterBody2D/basic_movement.gd | 2 +- .../CharacterBody3D/basic_movement.gd | 2 +- .../script_templates/EditorPlugin/plugin.gd | 3 +- .../basic_import_script.gd | 3 +- .../EditorScenePostImport/no_comments.gd | 3 +- .../EditorScript/basic_editor_script.gd | 3 +- .../RichTextEffect/default.gd | 7 +- .../VisualShaderNodeCustom/basic.gd | 9 +- modules/gdscript/gdscript.h | 4 +- modules/gdscript/gdscript_editor.cpp | 20 +-- modules/mono/csharp_script.cpp | 4 - modules/mono/csharp_script.h | 4 +- 18 files changed, 69 insertions(+), 139 deletions(-) diff --git a/core/object/script_language.h b/core/object/script_language.h index e0c4d650ddc0..aacba9d1367d 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -242,7 +242,9 @@ class ScriptLanguage : public Object { virtual bool validate(const String &p_script, const String &p_path = "", List *r_functions = nullptr, List *r_errors = nullptr, List *r_warnings = nullptr, HashSet *r_safe_lines = nullptr) const = 0; virtual String validate_path(const String &p_path) const { return ""; } virtual Script *create_script() const = 0; +#ifndef DISABLE_DEPRECATED virtual bool has_named_classes() const = 0; +#endif virtual bool supports_builtin_mode() const = 0; virtual bool supports_documentation() const { return false; } virtual bool can_inherit_from_file() const { return false; } diff --git a/core/object/script_language_extension.cpp b/core/object/script_language_extension.cpp index bf8bac476a3e..809fe2f683eb 100644 --- a/core/object/script_language_extension.cpp +++ b/core/object/script_language_extension.cpp @@ -98,7 +98,9 @@ void ScriptLanguageExtension::_bind_methods() { GDVIRTUAL_BIND(_validate_path, "path"); GDVIRTUAL_BIND(_create_script); +#ifndef DISABLE_DEPRECATED GDVIRTUAL_BIND(_has_named_classes); +#endif GDVIRTUAL_BIND(_supports_builtin_mode); GDVIRTUAL_BIND(_supports_documentation); GDVIRTUAL_BIND(_can_inherit_from_file); diff --git a/core/object/script_language_extension.h b/core/object/script_language_extension.h index e06f005320ab..30d521ef746b 100644 --- a/core/object/script_language_extension.h +++ b/core/object/script_language_extension.h @@ -344,7 +344,9 @@ class ScriptLanguageExtension : public ScriptLanguage { GDVIRTUAL_REQUIRED_CALL(_create_script, ret); return Object::cast_to