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

qttypes::QPainter unsound #267

Open
ogoffart opened this issue May 5, 2022 · 0 comments
Open

qttypes::QPainter unsound #267

ogoffart opened this issue May 5, 2022 · 0 comments

Comments

@ogoffart
Copy link
Member

ogoffart commented May 5, 2022

QPainter is declared as a cpp_class!, but QPainter can't be moved in memory because the QPainterPrivate holds a q_ptr pointer to the origial QPainter.

cpp_class!(
/// Wrapper around [`QPainter`][class] class.
///
/// [class]: https://doc.qt.io/qt-5/qpainter.html
pub unsafe struct QPainter as "QPainter "
);

We would need to somehow put the QPainter on the heap. But that'd be an incompatible change for people using it via the cpp! macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant