@@ -11,10 +11,10 @@ use crate::builtin::Callable;
11
11
use crate :: builtin:: { GString , Variant } ;
12
12
use crate :: classes:: object:: ConnectFlags ;
13
13
use crate :: meta;
14
- use crate :: meta:: InParamTuple ;
14
+ use crate :: meta:: { InParamTuple , ObjectToOwned } ;
15
15
use crate :: obj:: { bounds, Bounds , Gd , GodotClass , WithSignals } ;
16
16
use crate :: registry:: signal:: signal_receiver:: { IndirectSignalReceiver , SignalReceiver } ;
17
- use crate :: registry:: signal:: { ConnectHandle , ToSignalObj , TypedSignal } ;
17
+ use crate :: registry:: signal:: { ConnectHandle , TypedSignal } ;
18
18
19
19
/// Builder for customizing signal connections.
20
20
///
@@ -239,15 +239,15 @@ impl<C: WithSignals, Ps: InParamTuple + 'static> ConnectBuilder<'_, '_, C, Ps> {
239
239
/// - If you need cross-thread signals, use [`connect_sync()`](#method.connect_sync) instead (requires feature "experimental-threads").
240
240
pub fn connect_other_mut < F , OtherC > (
241
241
self ,
242
- object : & impl ToSignalObj < OtherC > ,
242
+ object : & impl ObjectToOwned < OtherC > ,
243
243
mut method : F ,
244
244
) -> ConnectHandle
245
245
where
246
246
OtherC : GodotClass + Bounds < Declarer = bounds:: DeclUser > ,
247
247
for < ' c_rcv > F : SignalReceiver < & ' c_rcv mut OtherC , Ps > ,
248
248
for < ' c_rcv > IndirectSignalReceiver < ' c_rcv , & ' c_rcv mut OtherC , Ps , F > : From < & ' c_rcv mut F > ,
249
249
{
250
- let mut gd = object. to_signal_obj ( ) ;
250
+ let mut gd = object. object_to_owned ( ) ;
251
251
252
252
let godot_fn = make_godot_fn ( move |args| {
253
253
let mut guard = Gd :: bind_mut ( & mut gd) ;
@@ -256,7 +256,7 @@ impl<C: WithSignals, Ps: InParamTuple + 'static> ConnectBuilder<'_, '_, C, Ps> {
256
256
. call ( & mut * guard, args) ;
257
257
} ) ;
258
258
259
- self . inner_connect_godot_fn :: < F > ( godot_fn, & object. to_signal_obj ( ) )
259
+ self . inner_connect_godot_fn :: < F > ( godot_fn, & object. object_to_owned ( ) )
260
260
}
261
261
262
262
/// Connect a method with any `&mut Gd<OtherC>` as the first parameter (user + engine classes).
@@ -272,23 +272,23 @@ impl<C: WithSignals, Ps: InParamTuple + 'static> ConnectBuilder<'_, '_, C, Ps> {
272
272
/// - If you need cross-thread signals, use [`connect_sync()`](#method.connect_sync) instead (requires feature "experimental-threads").
273
273
pub fn connect_other_gd < F , OtherC > (
274
274
self ,
275
- object : & impl ToSignalObj < OtherC > ,
275
+ object : & impl ObjectToOwned < OtherC > ,
276
276
mut method : F ,
277
277
) -> ConnectHandle
278
278
where
279
279
OtherC : GodotClass ,
280
280
F : SignalReceiver < Gd < OtherC > , Ps > ,
281
281
for < ' c_rcv > IndirectSignalReceiver < ' c_rcv , Gd < OtherC > , Ps , F > : From < & ' c_rcv mut F > ,
282
282
{
283
- let gd = object. to_signal_obj ( ) ;
283
+ let gd = object. object_to_owned ( ) ;
284
284
285
285
let godot_fn = make_godot_fn ( move |args| {
286
286
IndirectSignalReceiver :: from ( & mut method)
287
287
. function ( )
288
288
. call ( gd. clone ( ) , args) ;
289
289
} ) ;
290
290
291
- self . inner_connect_godot_fn :: < F > ( godot_fn, & object. to_signal_obj ( ) )
291
+ self . inner_connect_godot_fn :: < F > ( godot_fn, & object. object_to_owned ( ) )
292
292
}
293
293
294
294
/// Connect to this signal using a thread-safe function, allows the signal to be called across threads.
0 commit comments