KDAB/cxx-qt

expected a tuple with 36 elements, found one with 33 elements

Closed this issue · 2 comments

   Compiling cxx-qt v0.6.0
error[E0271]: type mismatch resolving `<QMetaObjectConnection as ExternType>::Id == (r, u, s, t, (), c, x, x, q, t, ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ...)`
   --> src/cxxqt_object.rs:3:1
    |
3   | #[cxx_qt::bridge]
    | ^^^^^^^^^^^^^^^^^ expected a tuple with 36 elements, found one with 33 elements
    |
    = note: expected tuple `(r, u, s, t, (), c, x, x, q, t, l, i, b, _1, (), Q, M, e, t, a, O, b, j, e, c, t, C, o, n, n, e, c, t, i, o, n)`
               found tuple `(r, u, s, t, (), c, x, x, q, t, _1, (), Q, M, e, t, a, O, b, j, e, c, t, C, o, n, n, e, c, t, i, o, n)`
note: required by a bound in `verify_extern_type`
   --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.121/src/extern_type.rs:184:41
    |
184 | pub fn verify_extern_type<T: ExternType<Id = Id>, Id>() {}
    |                                         ^^^^^^^ required by this bound in `verify_extern_type`
    = note: this error originates in the attribute macro `cxx_qt::bridge` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0271`.

I am using a commit to avoid this problem #850.

[dependencies]
cxx = "1.0.121"
cxx-qt = "0.6"
cxx-qt-lib = { git = "https://github.com/KDAB/cxx-qt.git", rev = "0a7dd9d9741723f93f88b769ce35a867aa22d48a" }

[build-dependencies]
# The link_qt_object_files feature is required for statically linking Qt 6.
cxx-qt-build = { version = "0.6", features = [ "link_qt_object_files" ] }

Thanks for taking the time to report this issue, so somewhere it is looking for rust::cxxqtlib1::QMetaObjectConnection instead of rust::cxxqt1::QMetaObjectConnection. These were renamed at one point, so either one has been missed or when using the Qt 6.7 patch fix you have partial changes.

Are you able to try the backports branch for 0.6.1 in your cargo.toml to see if it helps

[patch.crates-io]
cxx-qt = { git = "https://github.com/ahayzen-kdab/cxx-qt.git", branch = "backports-for-0.6.1" }
cxx-qt-build = { git = "https://github.com/ahayzen-kdab/cxx-qt.git", branch = "backports-for-0.6.1" }
cxx-qt-gen = { git = "https://github.com/ahayzen-kdab/cxx-qt.git", branch = "backports-for-0.6.1" }
cxx-qt-lib = { git = "https://github.com/ahayzen-kdab/cxx-qt.git", branch = "backports-for-0.6.1" }
cxx-qt-lib-headers = { git = "https://github.com/ahayzen-kdab/cxx-qt.git", branch = "backports-for-0.6.1" }
cxx-qt-macro = { git = "https://github.com/ahayzen-kdab/cxx-qt.git", branch = "backports-for-0.6.1" }
qt-build-utils = { git = "https://github.com/ahayzen-kdab/cxx-qt.git", branch = "backports-for-0.6.1" }

With that branch it compiles.