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

cxx-qt: Add CxxQtType trait #551

Merged
merged 1 commit into from
May 31, 2023
Merged

Conversation

LeonMatthesKDAB
Copy link
Collaborator

This trait is automatically implemented on any qobject::T. It currently exposes the inner Rust type for a given QObject.

First step of implementing #550

This also requires us to split our macros into a cxx-qt-macro crate, as otherwise only exporting proc-macros is allowed.
We could now potentially move CxxQtThread into the cxx-qt crate now to remove the dependency on cxx-qt-lib.

Cargo.toml Outdated Show resolved Hide resolved
@LeonMatthesKDAB LeonMatthesKDAB force-pushed the qtobject-trait branch 6 times, most recently from fa1df00 to 86b25c8 Compare May 30, 2023 07:04
@LeonMatthesKDAB LeonMatthesKDAB changed the title cxx-qt: Add a QtObject trait cxx-qt: Add CxxQtType trait May 30, 2023
@LeonMatthesKDAB LeonMatthesKDAB added ⬆️ feature New feature or request 🥳🎉 1.0 This issue is part of stabilization for 1.0 release 📖 documentation Improvements or additions to documentation labels May 30, 2023
@LeonMatthesKDAB LeonMatthesKDAB force-pushed the qtobject-trait branch 2 times, most recently from 6656177 to bb03423 Compare May 30, 2023 15:39
@ahayzen-kdab
Copy link
Collaborator

Just needs rebasing, then looks good :-)

Allows the type system to reason about the inner type of a given CXX-Qt
QObject.
Also cleanly documents where `rust` and `rust_mut` come from.
Copy link
Collaborator

@ahayzen-kdab ahayzen-kdab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ahayzen-kdab ahayzen-kdab enabled auto-merge (rebase) May 31, 2023 10:07
@ahayzen-kdab ahayzen-kdab merged commit 726b895 into KDAB:main May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation ⬆️ feature New feature or request 🥳🎉 1.0 This issue is part of stabilization for 1.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants