Prefer using Qt 6 over 5.
Both Qt 5 and Cppcheck's support for it are deprecated. This is the first step towards removing Qt 5 support.
Additional things related to this pull request:
- Adjust continuous testing workflows accordingly.
- Remove Cppcheck's deprecated support for qmake, as Qt 6 no longer uses it. If wished, I can work on these two aspects.
That is planned but not yet. There's still several workflow which need to be adjusted first and we should have at least one cycle where things are complete but not yet active. Also we should a warning first that we will do the switch. The hard switch might cause issues for some people. I also wanted to get in touch with some packagers about this and other things.
But unfortunately as mentioned in the other PR I am currently not able to follow up on things.
There's a ticket which is essentially about this. It is about switching to Qt6 for the official Windows binaries: https://trac.cppcheck.net/ticket/12066.
What about changing CMake:
- Try to find Qt 6. If found, use Qt 6.
- If Qt 6 is not found, use try to find Qt 5.
- If
USE_QT6is explicitly set tofalse(OFF, 0), skip step 1. This would help with a smooth transition from Qt 5 to Qt 6.
That was the behavior we had in the past.
Also as I mentioned it is not yet complete as you are not even able to generate a release with Qt6. Also it should be incremental in switching.
We might also need to adjust a few more things in CMake in terms of installing/generating a release - see https://trac.cppcheck.net/ticket/8659.
To make testing easier it would be good to have portable packages. That also still needs work: https://trac.cppcheck.net/ticket/10771 https://trac.cppcheck.net/ticket/10772
Feel free to reopen once comments have been addressed.