@@ -92,7 +92,7 @@ mod tests {
92
92
let generated = generate_rust_properties (
93
93
& properties,
94
94
& qobject_idents,
95
- & TypeNames :: default ( ) ,
95
+ & TypeNames :: mock ( ) ,
96
96
& format_ident ! ( "ffi" ) ,
97
97
)
98
98
. unwrap ( ) ;
@@ -116,7 +116,7 @@ mod tests {
116
116
assert_tokens_eq (
117
117
& generated. cxx_qt_mod_contents [ 0 ] ,
118
118
parse_quote ! {
119
- impl MyObject {
119
+ impl qobject :: MyObject {
120
120
#[ doc = "Getter for the Q_PROPERTY " ]
121
121
#[ doc = "trivial_property" ]
122
122
pub fn trivial_property( & self ) -> & i32 {
@@ -139,7 +139,7 @@ mod tests {
139
139
assert_tokens_eq (
140
140
& generated. cxx_qt_mod_contents [ 1 ] ,
141
141
parse_quote ! {
142
- impl MyObject {
142
+ impl qobject :: MyObject {
143
143
#[ doc = "Setter for the Q_PROPERTY " ]
144
144
#[ doc = "trivial_property" ]
145
145
pub fn set_trivial_property( mut self : core:: pin:: Pin <& mut Self >, value: i32 ) {
@@ -169,7 +169,7 @@ mod tests {
169
169
assert_tokens_eq (
170
170
& generated. cxx_qt_mod_contents [ 2 ] ,
171
171
parse_quote ! {
172
- impl MyObject {
172
+ impl qobject :: MyObject {
173
173
#[ doc = "Getter for the Q_PROPERTY " ]
174
174
#[ doc = "opaque_property" ]
175
175
pub fn opaque_property( & self ) -> & cxx:: UniquePtr <QColor > {
@@ -192,7 +192,7 @@ mod tests {
192
192
assert_tokens_eq (
193
193
& generated. cxx_qt_mod_contents [ 3 ] ,
194
194
parse_quote ! {
195
- impl MyObject {
195
+ impl qobject :: MyObject {
196
196
#[ doc = "Setter for the Q_PROPERTY " ]
197
197
#[ doc = "opaque_property" ]
198
198
pub fn set_opaque_property( mut self : core:: pin:: Pin <& mut Self >, value: cxx:: UniquePtr <QColor >) {
@@ -222,7 +222,7 @@ mod tests {
222
222
assert_tokens_eq (
223
223
& generated. cxx_qt_mod_contents [ 4 ] ,
224
224
parse_quote ! {
225
- impl MyObject {
225
+ impl qobject :: MyObject {
226
226
#[ doc = "Getter for the Q_PROPERTY " ]
227
227
#[ doc = "unsafe_property" ]
228
228
pub fn unsafe_property( & self ) -> & * mut T {
@@ -245,7 +245,7 @@ mod tests {
245
245
assert_tokens_eq (
246
246
& generated. cxx_qt_mod_contents [ 5 ] ,
247
247
parse_quote ! {
248
- impl MyObject {
248
+ impl qobject :: MyObject {
249
249
#[ doc = "Setter for the Q_PROPERTY " ]
250
250
#[ doc = "unsafe_property" ]
251
251
pub fn set_unsafe_property( mut self : core:: pin:: Pin <& mut Self >, value: * mut T ) {
@@ -307,11 +307,11 @@ mod tests {
307
307
assert_tokens_eq (
308
308
& generated. cxx_qt_mod_contents [ 6 ] ,
309
309
parse_quote ! {
310
- impl MyObject {
310
+ impl qobject :: MyObject {
311
311
#[ doc = "Connect the given function pointer to the signal " ]
312
312
#[ doc = "trivialPropertyChanged" ]
313
313
#[ doc = ", so that when the signal is emitted the function pointer is executed." ]
314
- pub fn connect_trivial_property_changed<F : FnMut ( core:: pin:: Pin <& mut MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut MyObject >, mut closure: F , conn_type: cxx_qt:: ConnectionType ) -> cxx_qt:: QMetaObjectConnectionGuard
314
+ pub fn connect_trivial_property_changed<F : FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut qobject :: MyObject >, mut closure: F , conn_type: cxx_qt:: ConnectionType ) -> cxx_qt:: QMetaObjectConnectionGuard
315
315
{
316
316
cxx_qt:: QMetaObjectConnectionGuard :: from( ffi:: MyObject_connect_trivial_property_changed (
317
317
self ,
@@ -325,13 +325,13 @@ mod tests {
325
325
assert_tokens_eq (
326
326
& generated. cxx_qt_mod_contents [ 7 ] ,
327
327
parse_quote ! {
328
- impl MyObject {
328
+ impl qobject :: MyObject {
329
329
#[ doc = "Connect the given function pointer to the signal " ]
330
330
#[ doc = "trivialPropertyChanged" ]
331
331
#[ doc = ", so that when the signal is emitted the function pointer is executed." ]
332
332
#[ doc = "\n " ]
333
333
#[ doc = "Note that this method uses a AutoConnection connection type." ]
334
- pub fn on_trivial_property_changed<F : FnMut ( core:: pin:: Pin <& mut MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut MyObject >, mut closure: F ) -> cxx_qt:: QMetaObjectConnectionGuard
334
+ pub fn on_trivial_property_changed<F : FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut qobject :: MyObject >, mut closure: F ) -> cxx_qt:: QMetaObjectConnectionGuard
335
335
{
336
336
cxx_qt:: QMetaObjectConnectionGuard :: from( ffi:: MyObject_connect_trivial_property_changed (
337
337
self ,
@@ -354,7 +354,7 @@ mod tests {
354
354
parse_quote ! {
355
355
impl cxx_qt:: signalhandler:: CxxQtSignalHandlerClosure for MyObjectCxxQtSignalClosuretrivialPropertyChanged {
356
356
type Id = cxx:: type_id!( "::rust::cxxqtgen1::MyObjectCxxQtSignalHandlertrivialPropertyChanged" ) ;
357
- type FnType = dyn FnMut ( core:: pin:: Pin <& mut MyObject >, ) ;
357
+ type FnType = dyn FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) ;
358
358
}
359
359
} ,
360
360
) ;
@@ -369,7 +369,7 @@ mod tests {
369
369
parse_quote ! {
370
370
fn call_MyObject_signal_handler_trivialPropertyChanged(
371
371
handler: & mut cxx_qt:: signalhandler:: CxxQtSignalHandler <MyObjectCxxQtSignalClosuretrivialPropertyChanged >,
372
- self_value: core:: pin:: Pin <& mut MyObject >,
372
+ self_value: core:: pin:: Pin <& mut qobject :: MyObject >,
373
373
) {
374
374
handler. closure( ) ( self_value, ) ;
375
375
}
@@ -433,11 +433,11 @@ mod tests {
433
433
assert_tokens_eq (
434
434
& generated. cxx_qt_mod_contents [ 14 ] ,
435
435
parse_quote ! {
436
- impl MyObject {
436
+ impl qobject :: MyObject {
437
437
#[ doc = "Connect the given function pointer to the signal " ]
438
438
#[ doc = "opaquePropertyChanged" ]
439
439
#[ doc = ", so that when the signal is emitted the function pointer is executed." ]
440
- pub fn connect_opaque_property_changed<F : FnMut ( core:: pin:: Pin <& mut MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut MyObject >, mut closure: F , conn_type: cxx_qt:: ConnectionType ) -> cxx_qt:: QMetaObjectConnectionGuard
440
+ pub fn connect_opaque_property_changed<F : FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut qobject :: MyObject >, mut closure: F , conn_type: cxx_qt:: ConnectionType ) -> cxx_qt:: QMetaObjectConnectionGuard
441
441
{
442
442
cxx_qt:: QMetaObjectConnectionGuard :: from( ffi:: MyObject_connect_opaque_property_changed (
443
443
self ,
@@ -451,13 +451,13 @@ mod tests {
451
451
assert_tokens_eq (
452
452
& generated. cxx_qt_mod_contents [ 15 ] ,
453
453
parse_quote ! {
454
- impl MyObject {
454
+ impl qobject :: MyObject {
455
455
#[ doc = "Connect the given function pointer to the signal " ]
456
456
#[ doc = "opaquePropertyChanged" ]
457
457
#[ doc = ", so that when the signal is emitted the function pointer is executed." ]
458
458
#[ doc = "\n " ]
459
459
#[ doc = "Note that this method uses a AutoConnection connection type." ]
460
- pub fn on_opaque_property_changed<F : FnMut ( core:: pin:: Pin <& mut MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut MyObject >, mut closure: F ) -> cxx_qt:: QMetaObjectConnectionGuard
460
+ pub fn on_opaque_property_changed<F : FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut qobject :: MyObject >, mut closure: F ) -> cxx_qt:: QMetaObjectConnectionGuard
461
461
{
462
462
cxx_qt:: QMetaObjectConnectionGuard :: from( ffi:: MyObject_connect_opaque_property_changed (
463
463
self ,
@@ -480,7 +480,7 @@ mod tests {
480
480
parse_quote ! {
481
481
impl cxx_qt:: signalhandler:: CxxQtSignalHandlerClosure for MyObjectCxxQtSignalClosureopaquePropertyChanged {
482
482
type Id = cxx:: type_id!( "::rust::cxxqtgen1::MyObjectCxxQtSignalHandleropaquePropertyChanged" ) ;
483
- type FnType = dyn FnMut ( core:: pin:: Pin <& mut MyObject >, ) ;
483
+ type FnType = dyn FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) ;
484
484
}
485
485
} ,
486
486
) ;
@@ -495,7 +495,7 @@ mod tests {
495
495
parse_quote ! {
496
496
fn call_MyObject_signal_handler_opaquePropertyChanged(
497
497
handler: & mut cxx_qt:: signalhandler:: CxxQtSignalHandler <MyObjectCxxQtSignalClosureopaquePropertyChanged >,
498
- self_value: core:: pin:: Pin <& mut MyObject >,
498
+ self_value: core:: pin:: Pin <& mut qobject :: MyObject >,
499
499
) {
500
500
handler. closure( ) ( self_value, ) ;
501
501
}
@@ -559,11 +559,11 @@ mod tests {
559
559
assert_tokens_eq (
560
560
& generated. cxx_qt_mod_contents [ 22 ] ,
561
561
parse_quote ! {
562
- impl MyObject {
562
+ impl qobject :: MyObject {
563
563
#[ doc = "Connect the given function pointer to the signal " ]
564
564
#[ doc = "unsafePropertyChanged" ]
565
565
#[ doc = ", so that when the signal is emitted the function pointer is executed." ]
566
- pub fn connect_unsafe_property_changed<F : FnMut ( core:: pin:: Pin <& mut MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut MyObject >, mut closure: F , conn_type: cxx_qt:: ConnectionType ) -> cxx_qt:: QMetaObjectConnectionGuard
566
+ pub fn connect_unsafe_property_changed<F : FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut qobject :: MyObject >, mut closure: F , conn_type: cxx_qt:: ConnectionType ) -> cxx_qt:: QMetaObjectConnectionGuard
567
567
{
568
568
cxx_qt:: QMetaObjectConnectionGuard :: from( ffi:: MyObject_connect_unsafe_property_changed (
569
569
self ,
@@ -577,13 +577,13 @@ mod tests {
577
577
assert_tokens_eq (
578
578
& generated. cxx_qt_mod_contents [ 23 ] ,
579
579
parse_quote ! {
580
- impl MyObject {
580
+ impl qobject :: MyObject {
581
581
#[ doc = "Connect the given function pointer to the signal " ]
582
582
#[ doc = "unsafePropertyChanged" ]
583
583
#[ doc = ", so that when the signal is emitted the function pointer is executed." ]
584
584
#[ doc = "\n " ]
585
585
#[ doc = "Note that this method uses a AutoConnection connection type." ]
586
- pub fn on_unsafe_property_changed<F : FnMut ( core:: pin:: Pin <& mut MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut MyObject >, mut closure: F ) -> cxx_qt:: QMetaObjectConnectionGuard
586
+ pub fn on_unsafe_property_changed<F : FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) + ' static >( self : core:: pin:: Pin <& mut qobject :: MyObject >, mut closure: F ) -> cxx_qt:: QMetaObjectConnectionGuard
587
587
{
588
588
cxx_qt:: QMetaObjectConnectionGuard :: from( ffi:: MyObject_connect_unsafe_property_changed (
589
589
self ,
@@ -606,7 +606,7 @@ mod tests {
606
606
parse_quote ! {
607
607
impl cxx_qt:: signalhandler:: CxxQtSignalHandlerClosure for MyObjectCxxQtSignalClosureunsafePropertyChanged {
608
608
type Id = cxx:: type_id!( "::rust::cxxqtgen1::MyObjectCxxQtSignalHandlerunsafePropertyChanged" ) ;
609
- type FnType = dyn FnMut ( core:: pin:: Pin <& mut MyObject >, ) ;
609
+ type FnType = dyn FnMut ( core:: pin:: Pin <& mut qobject :: MyObject >, ) ;
610
610
}
611
611
} ,
612
612
) ;
@@ -621,7 +621,7 @@ mod tests {
621
621
parse_quote ! {
622
622
fn call_MyObject_signal_handler_unsafePropertyChanged(
623
623
handler: & mut cxx_qt:: signalhandler:: CxxQtSignalHandler <MyObjectCxxQtSignalClosureunsafePropertyChanged >,
624
- self_value: core:: pin:: Pin <& mut MyObject >,
624
+ self_value: core:: pin:: Pin <& mut qobject :: MyObject >,
625
625
) {
626
626
handler. closure( ) ( self_value, ) ;
627
627
}
0 commit comments