Skip to content
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

Have an attribute on signals to say that that signal already exists #286

Closed
ahayzen-kdab opened this issue Oct 3, 2022 · 1 comment · Fixed by #415
Closed

Have an attribute on signals to say that that signal already exists #286

ahayzen-kdab opened this issue Oct 3, 2022 · 1 comment · Fixed by #415
Assignees
Labels
🤔 discussion Feedback welcome ⬆️ feature New feature or request
Milestone

Comments

@ahayzen-kdab
Copy link
Collaborator

Have an attribute on signals to say that that signal already exists, this would then allow you to declare that dataChanged already exists on the base class (eg for a listmodel).

#[cxx_qt::signals(MyObject)]
enum Signal {
    #[existing_name="dataChanged"]
    DataChanged
}

This would then generate the CXX bridge for the dataChanged method, which then means CXX does the asserts that a function exists that matches.

Do we need to check it's a Q_SIGNAL (and can we?) or is just a function enough.

@ahayzen-kdab ahayzen-kdab added the ⬆️ feature New feature or request label Oct 3, 2022
@ahayzen-kdab ahayzen-kdab added this to the 0.5 milestone Oct 3, 2022
@ahayzen-kdab ahayzen-kdab added the 🤔 discussion Feedback welcome label Nov 2, 2022
@ahayzen-kdab ahayzen-kdab self-assigned this Jan 16, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 16, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 16, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 16, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 16, 2023
@ahayzen-kdab
Copy link
Collaborator Author

Gone with #[cxx_name = "..."] and #[inherit] as attributes for now.

ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 24, 2023
Be-ing pushed a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 24, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 31, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 31, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 discussion Feedback welcome ⬆️ feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant