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

Cargo only example fails in main with Qt 5 due to std types confusion #592

Closed
ahayzen-kdab opened this issue Jun 26, 2023 · 2 comments · Fixed by #593
Closed

Cargo only example fails in main with Qt 5 due to std types confusion #592

ahayzen-kdab opened this issue Jun 26, 2023 · 2 comments · Fixed by #593
Labels
🪲 bug Something isn't working

Comments

@ahayzen-kdab
Copy link
Collaborator

ahayzen-kdab commented Jun 26, 2023

$ cargo run -p qml-minimal-no-cmake
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/qml-minimal-no-cmake`
QQmlApplicationEngine failed to load component
qrc:/main.qml:26:17: Invalid property assignment: unsupported type ""

Using main the cargo-only build fails to run with Qt 5 due to std_types.cpp not occurring, it however works with CMake.

This is likely due to +whole-archive missing ?

@ahayzen-kdab ahayzen-kdab added the 🪲 bug Something isn't working label Jun 26, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 26, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 26, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 26, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Closes KDAB#592
@Be-ing
Copy link
Contributor

Be-ing commented Jun 26, 2023

Oof, I hadn't noticed this because we default to using Qt6. I wonder when this bug was introduced?

@ahayzen-kdab
Copy link
Collaborator Author

Oof, I hadn't noticed this because we default to using Qt6. I wonder when this bug was introduced?

I assume it's from this 486b0a2

ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 26, 2023
As this potentially allows us to have cxx-qt-lib separate in the future.

Related to KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 27, 2023
As this potentially allows us to have cxx-qt-lib separate in the future.

Related to KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 27, 2023
As this potentially allows us to have cxx-qt-lib separate in the future.

Related to KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 27, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 27, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 27, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 28, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 28, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 28, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 28, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 28, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 28, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 28, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jun 29, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes KDAB#592
Be-ing pushed a commit that referenced this issue Jun 29, 2023
When building with cargo we need to ensure that the statics aren't
optimised out for registering types with Qt 5.

Otherwise we cannot use numbers in QML.

Also move std_types from -lib into -build, which potentially allows
us to have cxx-qt-lib separate in the future.

Closes #592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants