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

Add qsizetype to cxx-qt crate #882

Open
6 of 15 tasks
ahayzen-kdab opened this issue Mar 4, 2024 · 0 comments · May be fixed by #904
Open
6 of 15 tasks

Add qsizetype to cxx-qt crate #882

ahayzen-kdab opened this issue Mar 4, 2024 · 0 comments · May be fixed by #904
Assignees
Labels
⬆️ feature New feature or request

Comments

@ahayzen-kdab
Copy link
Collaborator

ahayzen-kdab commented Mar 4, 2024

This means that when wrapping APIs we don't need to cast the type in C++.

Then once conditional code is working correctly #765 this could mean that cxx-qt-lib can remove a load of C++ code where it's just casting between isize and qsizetype or int depending on Qt 5 or Qt 6.

Consider which of these types from <QtGlobal> could be useful, eg qint64 could remove a lot of static_cast in C++, probably remove the need for C++ trampolines so that there are direct CXX bindings and just have a into/from on the Rust side? (either in a Rust side wrapper or just accept Into in methods not sure what happens with returns though?)

Already map to std numerics (as in Rust/C++ std, so i32 ⇄ qint32 ⇄ std::int32_t)

  • qint8
  • qint16
  • qint32
  • quint8
  • quint16
  • quint32

Most useful types

  • qint64
  • qintptr
  • qsizetype
  • quint64
  • quintptr
  • qreal

Probably useful types?

  • qlonglong
  • qptrdiff
  • qulonglong
@ahayzen-kdab ahayzen-kdab added the ⬆️ feature New feature or request label Mar 4, 2024
@ahayzen-kdab ahayzen-kdab self-assigned this Mar 28, 2024
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Mar 28, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Apr 16, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Sep 5, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Sep 26, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Oct 10, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Oct 11, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Oct 11, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Oct 11, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Oct 11, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Nov 5, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Nov 5, 2024
Some times don't match the Rust types so add these missing types.

Closes KDAB#882
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⬆️ feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant