-
Notifications
You must be signed in to change notification settings - Fork 80
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
Improve QImage support #746
Conversation
66b9630
to
5b391a6
Compare
5b391a6
to
166fc07
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.
There are some small things we should still add.
Apart from that, looks great 😊
It's really cool how easy it is to add new types with CXX 🥳
One thing we'll want to figure out in another PR is how to support the additional constructors specified by QImage
. Especially the ones that take raw data and don't do any conversions.
Those may be performance-critical for some applications.
However, we should make sure that they are lifetime-safe and format-safe.
Introducing something like QImageRef<'a>
may work.
Or maybe just taking the data (e.g. Vec<u8>
/Box<[u8]>
) by-value is good enough if we use the clean-up functions to clean up later.
Oh, I also forgot to mention; we're completely missing tests for QImage atm! With proper support in this PR, we should at least have some tests to ensure the basics actually work and we don't i.e. crash when moving a QImage around! Then you can also remove this warning in the documentation 😉 /// > ⚠ **Warning**: The QImage API in CXX-Qt-lib is not yet complete and subject to change.
///
|
When writing the 0.6 release notes, we just remembered: QImage isn't in the changelog, please add it as you're now making it a proper feature :) |
@Montel while adding QImage into the changelog, you could also mention QLine / QLineF ;-) |
541afe1
to
33aae31
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
No description provided.