mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #109517 from precup/speedy-signal-disconnect
Speed up signal disconnects in the editor
This commit is contained in:
commit
416ba9a1c6
4 changed files with 22 additions and 4 deletions
|
|
@ -1522,6 +1522,18 @@ int Object::get_persistent_signal_connection_count() const {
|
|||
return count;
|
||||
}
|
||||
|
||||
uint32_t Object::get_signal_connection_flags(const StringName &p_name, const Callable &p_callable) const {
|
||||
OBJ_SIGNAL_LOCK
|
||||
const SignalData *signal_data = signal_map.getptr(p_name);
|
||||
if (signal_data) {
|
||||
const SignalData::Slot *slot = signal_data->slot_map.getptr(p_callable);
|
||||
if (slot) {
|
||||
return slot->conn.flags;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Object::get_signals_connected_to_this(List<Connection> *p_connections) const {
|
||||
OBJ_SIGNAL_LOCK
|
||||
|
||||
|
|
|
|||
|
|
@ -973,6 +973,7 @@ public:
|
|||
DEBUG_VIRTUAL void get_signal_connection_list(const StringName &p_signal, List<Connection> *p_connections) const;
|
||||
DEBUG_VIRTUAL void get_all_signal_connections(List<Connection> *p_connections) const;
|
||||
DEBUG_VIRTUAL int get_persistent_signal_connection_count() const;
|
||||
DEBUG_VIRTUAL uint32_t get_signal_connection_flags(const StringName &p_name, const Callable &p_callable) const;
|
||||
DEBUG_VIRTUAL void get_signals_connected_to_this(List<Connection> *p_connections) const;
|
||||
|
||||
DEBUG_VIRTUAL Error connect(const StringName &p_signal, const Callable &p_callable, uint32_t p_flags = 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue