Merge pull request #91570 from Naros/preferred_file_name_casing_default

Add default implementation of `ScriptLanguageExtension::preferred_file_name_casing`
This commit is contained in:
Rémi Verschelde 2024-05-07 09:04:48 +02:00
commit a1905b8e7d
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 10 additions and 1 deletions

View File

@ -389,7 +389,16 @@ public:
EXBIND0RC(bool, can_make_function)
EXBIND3R(Error, open_in_external_editor, const Ref<Script> &, int, int)
EXBIND0R(bool, overrides_external_editor)
EXBIND0RC(ScriptNameCasing, preferred_file_name_casing)
GDVIRTUAL0RC(ScriptNameCasing, _preferred_file_name_casing);
virtual ScriptNameCasing preferred_file_name_casing() const override {
ScriptNameCasing ret;
if (GDVIRTUAL_CALL(_preferred_file_name_casing, ret)) {
return ret;
}
return ScriptNameCasing::SCRIPT_NAME_CASING_SNAKE_CASE;
}
GDVIRTUAL3RC(Dictionary, _complete_code, const String &, const String &, Object *)