2024-03-19 12:02:54 +00:00
|
|
|
# Doesn't produce the warning:
|
|
|
|
signal used_as_first_class_signal()
|
|
|
|
signal used_with_signal_constructor()
|
|
|
|
signal used_with_signal_emit()
|
|
|
|
signal used_with_object_emit_signal()
|
|
|
|
signal used_with_object_connect()
|
|
|
|
signal used_with_object_disconnect()
|
|
|
|
signal used_with_self_prefix()
|
|
|
|
|
|
|
|
# Produce the warning:
|
|
|
|
signal used_with_dynamic_name()
|
|
|
|
signal just_unused()
|
2024-02-28 14:23:11 +00:00
|
|
|
@warning_ignore("unused_signal")
|
2024-03-19 12:02:54 +00:00
|
|
|
signal unused_but_ignored()
|
2024-02-28 14:23:11 +00:00
|
|
|
|
|
|
|
func no_exec():
|
2024-03-19 12:02:54 +00:00
|
|
|
print(used_as_first_class_signal)
|
|
|
|
print(Signal(self, "used_with_signal_constructor"))
|
|
|
|
used_with_signal_emit.emit()
|
|
|
|
print(emit_signal("used_with_object_emit_signal"))
|
|
|
|
print(connect("used_with_object_connect", Callable()))
|
|
|
|
disconnect("used_with_object_disconnect", Callable())
|
|
|
|
print(self.emit_signal("used_with_self_prefix"))
|
|
|
|
|
|
|
|
var dynamic_name := "used_with_dynamic_name"
|
|
|
|
print(emit_signal(dynamic_name))
|
2024-02-28 14:23:11 +00:00
|
|
|
|
|
|
|
func test():
|
|
|
|
pass
|