summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2022-07-28 22:56:41 +0200
committerJuan Linietsky <reduzio@gmail.com>2022-07-29 16:26:13 +0200
commitd4433ae6d3a525683ef37ea521d30b6b97a44024 (patch)
tree35870bbe04b53c95ac9d79cc696f9a5356e62418 /tests
parent14d021287bced6a7f5ab9db24936bd07b4cfdfd0 (diff)
Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
Diffstat (limited to 'tests')
-rw-r--r--tests/test_macros.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/test_macros.h b/tests/test_macros.h
index 6029a9cfc7..eff09fb4b0 100644
--- a/tests/test_macros.h
+++ b/tests/test_macros.h
@@ -271,22 +271,20 @@ public:
static SignalWatcher *get_singleton() { return singleton; }
void watch_signal(Object *p_object, const String &p_signal) {
- Vector<Variant> args;
- args.push_back(p_signal);
MethodInfo method_info;
ClassDB::get_signal(p_object->get_class(), p_signal, &method_info);
switch (method_info.arguments.size()) {
case 0: {
- p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_zero), args);
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_zero).bind(p_signal));
} break;
case 1: {
- p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_one), args);
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_one).bind(p_signal));
} break;
case 2: {
- p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_two), args);
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_two).bind(p_signal));
} break;
case 3: {
- p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_three), args);
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_three).bind(p_signal));
} break;
default: {
MESSAGE("Signal ", p_signal, " arg count not supported.");