Added function get_signals_connected_to_this_this()
should help properly implement #5058
This commit is contained in:
parent
955ed0a95f
commit
85f4f39279
|
@ -1401,6 +1401,13 @@ bool Object::has_persistent_signal_connections() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
void Object::get_signals_connected_to_this(List<Connection> *p_connections) const {
|
||||
|
||||
for (const List<Connection>::Element *E=connections.front();E;E=E->next()) {
|
||||
p_connections->push_back(E->get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Error Object::connect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method,const Vector<Variant>& p_binds,uint32_t p_flags) {
|
||||
|
||||
|
|
|
@ -605,6 +605,7 @@ public:
|
|||
void get_signal_connection_list(const StringName& p_signal,List<Connection> *p_connections) const;
|
||||
void get_all_signal_connections(List<Connection> *p_connections) const;
|
||||
bool has_persistent_signal_connections() const;
|
||||
void get_signals_connected_to_this(List<Connection> *p_connections) const;
|
||||
|
||||
Error connect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method,const Vector<Variant>& p_binds=Vector<Variant>(),uint32_t p_flags=0);
|
||||
void disconnect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method);
|
||||
|
|
Loading…
Reference in New Issue