diff --git a/misc/extension_api_validation/4.3-stable.expected b/misc/extension_api_validation/4.3-stable.expected index 5a27302a1267..ea0ccfb0fea1 100644 --- a/misc/extension_api_validation/4.3-stable.expected +++ b/misc/extension_api_validation/4.3-stable.expected @@ -268,3 +268,11 @@ GH-98441 Validate extension JSON: Error: Field 'global_enums/KeyModifierMask/values/KEY_MODIFIER_MASK': value changed value in new API, from 5.32677e+08 to 2130706432. Key modifier mask value corrected. API change documented for compatibility. + + +GH-100019 +-------- +Validate extension JSON: Error: Field 'classes/CodeEdit/methods/add_code_completion_option/arguments': size changed value in new API, from 6 to 8. +Validate extension JSON: Error: Field 'classes/CodeEdit/methods/add_code_completion_option/arguments': size changed value in new API, from 7 to 8. + +New argument `deprecated` added to `add_code_completion_option`. Compatibility method registered. diff --git a/scene/gui/code_edit.compat.inc b/scene/gui/code_edit.compat.inc index 8dd7c00aa458..97d91c001ed1 100644 --- a/scene/gui/code_edit.compat.inc +++ b/scene/gui/code_edit.compat.inc @@ -38,9 +38,15 @@ void CodeEdit::_add_code_completion_option_compat_84906(CodeCompletionKind p_typ add_code_completion_option(p_type, p_display_text, p_insert_text, p_text_color, p_icon, p_value, p_location); } +void CodeEdit::_add_code_completion_option_compat_100019(CodeCompletionKind p_type, const String &p_display_text, const String &p_insert_text, const Color &p_text_color, const Ref &p_icon, const Variant &p_value, int p_location) { + add_code_completion_option(p_type, p_display_text, p_insert_text, p_text_color, p_icon, p_value, p_location, false); +} + void CodeEdit::_bind_compatibility_methods() { ClassDB::bind_compatibility_method(D_METHOD("get_text_for_symbol_lookup"), &CodeEdit::_get_text_for_symbol_lookup_bind_compat_73196); + ClassDB::bind_compatibility_method(D_METHOD("add_code_completion_option", "type", "display_text", "insert_text", "text_color", "icon", "value", "location"), &CodeEdit::_add_code_completion_option_compat_84906, DEFVAL(Color(1, 1, 1)), DEFVAL(Ref()), DEFVAL(Variant::NIL), DEFVAL(LOCATION_OTHER)); + ClassDB::bind_compatibility_method(D_METHOD("add_code_completion_option", "type", "display_text", "insert_text", "text_color", "icon", "value", "location"), &CodeEdit::_add_code_completion_option_compat_100019, DEFVAL(Color(1, 1, 1)), DEFVAL(Ref()), DEFVAL(Variant()), DEFVAL(LOCATION_OTHER)); } #endif diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h index 39d61505735f..bb111f03ba87 100644 --- a/scene/gui/code_edit.h +++ b/scene/gui/code_edit.h @@ -319,6 +319,7 @@ class CodeEdit : public TextEdit { #ifndef DISABLE_DEPRECATED String _get_text_for_symbol_lookup_bind_compat_73196(); void _add_code_completion_option_compat_84906(CodeCompletionKind p_type, const String &p_display_text, const String &p_insert_text, const Color &p_text_color = Color(1, 1, 1), const Ref &p_icon = Ref(), const Variant &p_value = Variant::NIL, int p_location = LOCATION_OTHER); + void _add_code_completion_option_compat_100019(CodeCompletionKind p_type, const String &p_display_text, const String &p_insert_text, const Color &p_text_color = Color(1, 1, 1), const Ref &p_icon = Ref(), const Variant &p_value = Variant(), int p_location = LOCATION_OTHER); static void _bind_compatibility_methods(); #endif