-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cxx-qt-gen: remove generation of wrapper for emitting signals #556
cxx-qt-gen: remove generation of wrapper for emitting signals #556
Conversation
This doesn't work yet as we have two different cases for inheriting signals
For the first we need to generate a connect + emit method, the second we need to generate a connect method but no emit as the qproperty has done this already. #[cxx_qt::qsignals(CustomBaseClass)]
pub enum Signals<'a> {
/// Inherit the DataChanged signal from the QAbstractListModel base class
#[inherit]
DataChanged {
/// Top left affected index
top_left: &'a QModelIndex,
/// Bottom right affected index
bottom_right: &'a QModelIndex,
/// Roles that have been modified
roles: &'a QVector_i32,
},
}
#[cxx_qt::qsignals(RustSignals)]
pub enum Connection<'a> {
// Example of using #[inherit] so that connections to the logging_enabled property can be made
#[inherit]
// We don't ever emit this enum, so silence clippy warnings
#[allow(dead_code)]
/// The Q_SIGNAL emitted when the Q_PROPERTY logging_enabled changes
LoggingEnabledChanged,
} |
This will be solved by the new API as in that when there is a qproperty a myPropertyChanged signal will be generated and the connect method. So we don't have the enum craziness. |
5e84ebf
to
a482d20
Compare
Requires #571 |
a482d20
to
0be3a72
Compare
e8a8729
to
6487d11
Compare
This now works and ready for review :-) |
This is now unused as the type conversion has been removed. Related to KDAB#289
6487d11
to
d7fc274
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, always good to see things simplified.
This is now unused as the type conversion has been removed.
Requires #554
Requires #571