Closed ahayzen-kdab closed 5 months ago
Instead of having our QMetaObjectConnection automatically be RAII, instead just return the normal type in cxx-qt-gen.
Then in cxx-qt-lib change QMetaObjectConnection to be QMetaObjectConnectionGuard.
This could allow for cxx-qt-gen to not depend on cxx-qt-lib (helping #319 ).
my_qobject.on_signal(...).release(); // becomes my_qobject.on_signal(...); let connection = my_object.on_signal(...); connection.release(); //becomes let guard = cxx_qt_lib::QMetaObjectConnectiongGuard::from(my_qobject.on_signal(...)); guard.release(); { let _ = my_object.on_signal(...); } // disconnection // becomes { let _ = cxx_qt_lib::QMetaObjectConnectiongGuard::from(my_qobject.on_signal(...)); }
Instead of having our QMetaObjectConnection automatically be RAII, instead just return the normal type in cxx-qt-gen.
Then in cxx-qt-lib change QMetaObjectConnection to be QMetaObjectConnectionGuard.
This could allow for cxx-qt-gen to not depend on cxx-qt-lib (helping #319 ).