This PR facilitates future migration to Qt 6 and is a prerequisite for #30997.
No behaviour change.
This change facilitates future migration to Qt 6.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--9cd9c72976c961c55c7acef8f6ba82cd-->
| File | commit fc642c33ef28829eda0119a0fe39fd9bc4b84051<br>(master) | commit 05d9a14c3df8665da6f2e506362cf893d5cd9195<br>(master and this pull) |
|---|---|---|
| guix_build.log | 08c5fbe5d07150d8... |
621e8b126d06680e... |
| SHA256SUMS.part | 8d7f5731d2bd8c06... |
|
| *-aarch64-linux-gnu-debug.tar.gz | bafe314a204a7b0d... |
|
| *-aarch64-linux-gnu.tar.gz | b7ba214b5a49480d... |
|
| *-arm-linux-gnueabihf-debug.tar.gz | 369109998e0028ea... |
|
| *-arm-linux-gnueabihf.tar.gz | d44b05a86c093532... |
|
| *-arm64-apple-darwin-unsigned.tar.gz | e3d5b544612c8bbc... |
|
| *-arm64-apple-darwin-unsigned.zip | f5a6ec285c97ec1c... |
|
| *-arm64-apple-darwin.tar.gz | 9253378e8e9c3d6d... |
|
| *-powerpc64-linux-gnu-debug.tar.gz | ced736975a3f47a1... |
|
| *-powerpc64-linux-gnu.tar.gz | 48097fb1753a7245... |
|
| *-riscv64-linux-gnu-debug.tar.gz | 2c71bd13e9a85097... |
|
| *-riscv64-linux-gnu.tar.gz | 4dc3169f59878f37... |
|
| *-x86_64-apple-darwin-unsigned.tar.gz | 1472e26d1a620a3f... |
|
| *-x86_64-apple-darwin-unsigned.zip | 9f44a51b27e65620... |
|
| *-x86_64-apple-darwin.tar.gz | 217a98edcba97211... |
|
| *-x86_64-linux-gnu-debug.tar.gz | a2e7d2f6cca74058... |
|
| *-x86_64-linux-gnu.tar.gz | 7b9ba448b9c5d57a... |
|
| *.tar.gz | 6d35dde5dbb66ca4... |
|
| guix_build.log.diff | f8454806f959f803... |
176 | @@ -177,7 +177,7 @@ if(BUILD_GUI) 177 | if(BUILD_GUI_TESTS) 178 | list(APPEND qt_components Test) 179 | endif() 180 | - find_package(Qt5 5.11.3 MODULE REQUIRED 181 | + find_package(Qt 5.11.3 MODULE REQUIRED
It seems to me we're still hardcoding the major version - can't we change this during migration instead?
55 | @@ -56,11 +56,11 @@ else() 56 | endif() 57 | 58 | include(FindPackageHandleStandardArgs) 59 | -find_package_handle_standard_args(Qt5 60 | - REQUIRED_VARS Qt5_DIR 61 | - VERSION_VAR Qt5_VERSION 62 | +find_package_handle_standard_args(Qt 63 | + REQUIRED_VARS Qt${Qt_FIND_VERSION_MAJOR}_DIR 64 | + VERSION_VAR Qt${Qt_FIND_VERSION_MAJOR}_VERSION
Do we need to keep the version variables here?
It logs the actual Qt version in the output:
-- Found Qt: /usr/lib/x86_64-linux-gnu/cmake/Qt5 (found suitable version "5.15.13", minimum required is "5.11.3")
Otherwise, the output will be less informative:
-- Found Qt: /usr/lib/x86_64-linux-gnu/cmake/Qt5 (Required is at least version "5.11.3")
39 | @@ -40,10 +40,10 @@ endif() 40 | # /usr/x86_64-w64-mingw32/lib/libm.a or /usr/arm-linux-gnueabihf/lib/libm.a. 41 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) 42 | 43 | -find_package(Qt5 ${Qt5_FIND_VERSION} 44 | - COMPONENTS ${Qt5_FIND_COMPONENTS} 45 | +find_package(Qt${Qt_FIND_VERSION_MAJOR} ${Qt_FIND_VERSION} 46 | + COMPONENTS ${Qt_FIND_COMPONENTS}
nit: is there a reason for keeping the t lowercase? Looks weird this way...
Wow, so much magic
Concept ACK
utACK deacf3c7cd68dd4ee973526740e45c7015b6433a
Seems fine with me, we could update the Qt5 to Qt6 as well, but i imagine removing the version number saves us work when we move to Qt7 in the future 😄
Code review ACK deacf3c7cd68dd4ee973526740e45c7015b6433a.
lgtm ACK deacf3c7cd68dd4ee973526740e45c7015b6433a