summaryrefslogtreecommitdiff
path: root/scene/gui/tree.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-20 11:30:56 +0100
committerGitHub <noreply@github.com>2020-02-20 11:30:56 +0100
commitbd61281a5f515065b05be008dd3d6b73a03f5a7c (patch)
tree0add52fc270f808b4b2ad0bf7c970d72338c667e /scene/gui/tree.cpp
parent1a4be2cd8fdd9ba26f016f3e2d83febfe8ae141c (diff)
parent69c95f4b4c128a22777af1e155bc24c7033decca (diff)
Merge pull request #36368 from reduz/variant-rework
Reworked signal system, added support for Callable and Signal
Diffstat (limited to 'scene/gui/tree.cpp')
-rw-r--r--scene/gui/tree.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 08835be9fd..d9ca940177 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -729,16 +729,16 @@ bool TreeItem::is_folding_disabled() const {
return disable_folding;
}
-Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
- r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
+ r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 0;
return Variant();
}
if (p_args[0]->get_type() != Variant::STRING) {
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
return Variant();
@@ -750,7 +750,7 @@ Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, V
return Variant();
}
-void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (!p_item) {
return;
}
@@ -762,7 +762,7 @@ void recursive_call_aux(TreeItem *p_item, const StringName &p_method, const Vari
}
}
-void TreeItem::call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+void TreeItem::call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
recursive_call_aux(this, p_method, p_args, p_argcount, r_error);
}
@@ -4043,15 +4043,15 @@ Tree::Tree() {
add_child(v_scroll);
range_click_timer = memnew(Timer);
- range_click_timer->connect("timeout", this, "_range_click_timeout");
+ range_click_timer->connect_compat("timeout", this, "_range_click_timeout");
add_child(range_click_timer);
- h_scroll->connect("value_changed", this, "_scroll_moved");
- v_scroll->connect("value_changed", this, "_scroll_moved");
- text_editor->connect("text_entered", this, "_text_editor_enter");
- text_editor->connect("modal_closed", this, "_text_editor_modal_close");
- popup_menu->connect("id_pressed", this, "_popup_select");
- value_editor->connect("value_changed", this, "_value_editor_changed");
+ h_scroll->connect_compat("value_changed", this, "_scroll_moved");
+ v_scroll->connect_compat("value_changed", this, "_scroll_moved");
+ text_editor->connect_compat("text_entered", this, "_text_editor_enter");
+ text_editor->connect_compat("modal_closed", this, "_text_editor_modal_close");
+ popup_menu->connect_compat("id_pressed", this, "_popup_select");
+ value_editor->connect_compat("value_changed", this, "_value_editor_changed");
value_editor->set_as_toplevel(true);
text_editor->set_as_toplevel(true);