Skip to content

Conversation

@jnbooth
Copy link
Contributor

@jnbooth jnbooth commented Jul 19, 2025

Closes #1308.

@codecov
Copy link

codecov bot commented Jul 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f88253b) to head (36a4e63).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1314   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           75        75           
  Lines        13038     13038           
=========================================
  Hits         13038     13038           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@angus-3d
Copy link

thank you @jnbooth ! Really appreciate it :-)

Copy link
Collaborator

@LeonMatthesKDAB LeonMatthesKDAB left a comment

Choose a reason for hiding this comment

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

Hi @jnbooth, thank you for for the contribution. Again, please excuse the delayed review.

The QQuaternion looks good. QGenericMatrix still has some room for improvement.

/// The QGenericMatrix class represents a quaternion consisting of a vector and scalar.
///
/// Qt Documentation: [QGenericMatrix](https://doc.qt.io/qt/qgenericmatrix.html#details)
#[repr(transparent)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#[repr(transparent)]
#[repr(C)]

I think this needs to be repr(C), as otherwise it's not necessarily guaranteed that the layout matches the layout in C++, even with repr(transparent).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is for its layout to be that of [[f32; M]; N], rather than a struct with one [[f32; M]; N] member.

Copy link
Collaborator

Choose a reason for hiding this comment

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

But in C++ it is a struct with one [[f32; M]; N] member, right? And the goal is to be bit-for-bit compatible with that struct...

Copy link
Collaborator

@LeonMatthesKDAB LeonMatthesKDAB left a comment

Choose a reason for hiding this comment

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

Sorry, just noticed the #[repr(..)] discussion is still unresolved.

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

Successfully merging this pull request may close these issues.

Add support for QQuaternion (with variant conversion)

3 participants