Skip to content

qt-build-utils can invoke qmake when it is a script #1284

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SanderVocke
Copy link
Contributor

Ensure qmake is called either through cmd (Windows) or sh (Linux/MacOS).

The main change is this invocation. The rest of the code change is:

  • There were two places qmake were previously invoked and they didn't share code. To prevent duplicating this shell wrapper, refactored a bit to ensure they both call the same method to query qmake.
  • Due to said refactoring, also had to change the error handling a bit because the error generation moved. Added error types.

@SanderVocke
Copy link
Contributor Author

SanderVocke commented May 22, 2025

I only tested this so far on the "happy case" on Windows (that is to say: when using a qmake .bat wrapper). Will test on other platforms too.

@SanderVocke SanderVocke marked this pull request as draft May 22, 2025 18:54
@SanderVocke SanderVocke marked this pull request as ready for review May 23, 2025 09:15
@SanderVocke
Copy link
Contributor Author

I marked as ready for review.
Tested all combinations of QMAKE=qmake6 and QMAKE=(a qmake wrapper).[sh|bat] on Windows, Ubuntu and MacOS GitHub runners and cxx-qt builds fine with these combinations.

Please advise how to solve the rust formatting error in CI: a simple cargo fmt in the project did not succeed:

C:\sdev\cxx-qt> cargo fmt
error: expected item, found `..`
 --> \\?\C:\sdev\cxx-qt\examples\cargo_without_cmake\src\cxxqt_object.rs:1:1
  |
1 | ../../qml_minimal/rust/src/cxxqt_object.rs
  | ^^ expected item
  |
  = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>

Error writing files: failed to resolve mod `cxxqt_object`: cannot parse \\?\C:\sdev\cxx-qt\examples\cargo_without_cmake\src\cxxqt_object.rs

Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (4979207) to head (0629fcc).

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

☔ 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.

@SanderVocke SanderVocke marked this pull request as draft May 23, 2025 10:03
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.

1 participant