summaryrefslogtreecommitdiff
path: root/scene/2d/visibility_notifier_2d.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-21 23:26:13 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-28 14:24:09 +0100
commitf742dabafee7f54e1b77148d547e2031d7cc535e (patch)
tree5aab3c9c4b9aca10d190a7efa600afb8c7aef213 /scene/2d/visibility_notifier_2d.cpp
parent01afc442c73661df677c2b93f4037a21992ee45b (diff)
Signals: Manually port most of remaining connect_compat uses
It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
Diffstat (limited to 'scene/2d/visibility_notifier_2d.cpp')
-rw-r--r--scene/2d/visibility_notifier_2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 3bfaf1f95c..366de28386 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -224,7 +224,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
if (add) {
- p_node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT);
+ p_node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &VisibilityEnabler2D::_node_removed), varray(p_node), CONNECT_ONESHOT);
nodes[p_node] = meta;
_change_node_state(p_node, false);
}
@@ -267,7 +267,7 @@ void VisibilityEnabler2D::_notification(int p_what) {
if (!visible)
_change_node_state(E->key(), true);
- E->key()->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed");
+ E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &VisibilityEnabler2D::_node_removed));
}
nodes.clear();