From 4b6bef65242c6ccd96ac857a764c952e61441593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 9 Jan 2018 16:39:43 +0100 Subject: Fix signal arguments shadowing member variables Fixes #10212. --- doc/classes/BaseButton.xml | 4 ++-- doc/classes/LineEdit.xml | 4 ++-- scene/gui/base_button.cpp | 4 ++-- scene/gui/line_edit.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 7f1aaa6822..9dd3cf0eff 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -21,7 +21,7 @@ - + Called when button is toggled (only if toggle_mode is active). @@ -82,7 +82,7 @@ - + This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]pressed[/i] argument. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 4434a7b7e2..c28b722eb3 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -131,14 +131,14 @@ - + Emitted when the text changes. - + Emitted when the user presses KEY_ENTER on the [code]LineEdit[/code]. diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index d765248cca..8b9469021c 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -504,12 +504,12 @@ void BaseButton::_bind_methods() { ClassDB::bind_method(D_METHOD("get_button_group"), &BaseButton::get_button_group); BIND_VMETHOD(MethodInfo("_pressed")); - BIND_VMETHOD(MethodInfo("_toggled", PropertyInfo(Variant::BOOL, "pressed"))); + BIND_VMETHOD(MethodInfo("_toggled", PropertyInfo(Variant::BOOL, "button_pressed"))); ADD_SIGNAL(MethodInfo("pressed")); ADD_SIGNAL(MethodInfo("button_up")); ADD_SIGNAL(MethodInfo("button_down")); - ADD_SIGNAL(MethodInfo("toggled", PropertyInfo(Variant::BOOL, "pressed"))); + ADD_SIGNAL(MethodInfo("toggled", PropertyInfo(Variant::BOOL, "button_pressed"))); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "toggle_mode"), "set_toggle_mode", "is_toggle_mode"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed"); diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 53f609723f..97f740a4ba 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1413,8 +1413,8 @@ void LineEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("set_context_menu_enabled", "enable"), &LineEdit::set_context_menu_enabled); ClassDB::bind_method(D_METHOD("is_context_menu_enabled"), &LineEdit::is_context_menu_enabled); - ADD_SIGNAL(MethodInfo("text_changed", PropertyInfo(Variant::STRING, "text"))); - ADD_SIGNAL(MethodInfo("text_entered", PropertyInfo(Variant::STRING, "text"))); + ADD_SIGNAL(MethodInfo("text_changed", PropertyInfo(Variant::STRING, "new_text"))); + ADD_SIGNAL(MethodInfo("text_entered", PropertyInfo(Variant::STRING, "new_text"))); BIND_ENUM_CONSTANT(ALIGN_LEFT); BIND_ENUM_CONSTANT(ALIGN_CENTER); -- cgit v1.2.3