Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/github-cxx-qt-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,49 @@ jobs:
path: ./target/debug/lcov.info
if-no-files-found: ignore

build-qt-minimal:
name: Ubuntu 24.04 (gcc) Qt 6 Minimal
needs: [clang_format, license_check, rust_format_check, markdown_lint, shellcheck]
runs-on: ubuntu-24.04
steps:
- name: "Checkout repository"
uses: actions/checkout@v6
- name: Setup toolchain
run: |
rustup default 1.85.0
rustup component add rustfmt

- name: "Install clang-format"
# Note ensure that clang-format runner is updated too
run: |
pip install --user --break-system-packages --verbose clang-format==18.1.8
echo "Checking for path: ${{ matrix.clang_format_path }}"
test -x ${{ matrix.clang_format_path }}

- name: "[Ubuntu] Install dependencies"
if: runner.os == 'Linux'
run: >-
sudo apt-get update &&
sudo apt-get install -y
ninja-build
libdouble-conversion3
libglx-dev
libopengl-dev
libssl-dev
pkg-config
valgrind

# Just test that we can build with no Qt install available
#
# NOTE: no compiler cache is needed as build is fast
- name: "Build"
run: cargo build --package qml-minimal-no-cmake
- name: Test output files exist
run: |
! command -v qmake
test -x ./target/debug/qml-minimal-no-cmake
ldd ./target/debug/qml-minimal-no-cmake

build-wasm:
name: Ubuntu 24.04 (wasm_32) Qt 6
needs: [clang_format, license_check, rust_format_check, markdown_lint, shellcheck]
Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/cxx-qt-lib/src/gui/qimage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ mod ffi {
/// This function is scheduled for deprecation in version 6.13.
#[cfg(all(
cxxqt_qt_version_at_least_6,
not(cxxqt_qt_version_at_least_6_13),
not(cxxqt_qt_version_at_least_6_10),
not(cxxqt_qt_version_at_least_7)
))]
fn mirror(self: &mut QImage, horizontal: bool, vertical: bool);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

either need to remove mirror now or fix qt_minimal so it exists until Qt 6.13

Copy link
Collaborator

Choose a reason for hiding this comment

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

What currently needs this, would it be safe to put it behind a feature to use it, so that people can still access it, but we can eventually deprecate the feature?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So the current test builds of Qt minimal for some reason do not evaluate the C++ macros around deprecated since correctly. So when you try to build with Qt minimal 6.10.0 the method doesn't exist, this is a temporary hack to make it work however a proper solution is either

  • Fix Qt minimal to correctly expand it's macros
  • Totally remove this method from cxx-qt-lib
  • Have some temporary? magical feature to disable/enable it 🤷

Expand Down
6 changes: 6 additions & 0 deletions examples/cargo_without_cmake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ cxx-qt-lib = { workspace = true, features = ["full"] }
[build-dependencies]
# The link_qt_object_files feature is required for statically linking Qt 6.
cxx-qt-build = { workspace = true, features = [ "link_qt_object_files" ] }

# Enable qt_minimal feature in qt-build-utils and specify a qt-version
# this allows for automatically downloading Qt when not found with qmake
qt-build-utils = { workspace = true, features = ["qt_minimal"] }
# NOTE: this prevents any project within the workspace from picking less than 6.2 automatically
qt-version = { version = "0.1.3", default-features = false, features = ["qt_version_at_least_6_2"] }
Loading