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
Build: qt6 build issues #981
Comments
I just built using pretty much the same... albeit on Windows 11. I got none of these warnings. ??? Out of all the warnings the only one that makes any sense is the QtStringLiteral()... since it's a actully a MACRO it probably doesn't like the empty arguments.... so it should be QStringLiteral(""). Some warnings don't even make sense... like the default label in the switch.... if there's a problem with that there should be a 100 warnings as most if not all the switch statements have a default: in them. The no discard attibute... it's complaining about a compiler conditional?? and it''s complaining about an unsed header?? That being said... warnings are not the issue with a Qt6 build. |
Can you try it with MSVC 2022? Ci is using that version. |
Why? These are just warnings. I'm using MSVC 2019 and it builds without the warnings. There are other issues that have nothing to do with MSVC 2022 vs MSVC 2019... neither kit build runs correctly. |
I took a closer look at all these:
I would assume it's complaing about the load() functions which return a bool that are not being checked. These are legit warnings as it should be calling QStringLiteral("") instead of QStringLiteral()
This is also legit... since the base class already has a virtual destructor, no need to redefine one in the subclass - thus it's "deprecated"
This one is a bit confusing as like I stated before there are mulitple instances of the use of a case followed by default:. This appears to be complaining because it expects the previous case to break, then the default case. Simple solution in this case is to simply remove the default label. Shouldn't be calling the routine with a case that can't be handled anyway... and in the event some other programmer does, they'll get an error meaning they need to fix something.
Again this is one is just pointing out the include can be removed as it's not needed. Which I'm sure theres a lot more than just this unused include.
I will fix all these. |
@DSCaskey Thanks for looking into these compiler warnings.And please, if you see another set of code fixes like these that would be a good issue for @Esterjudith to work on to become familiar with our code, add it as an issue. |
@slspencer I believe I have squashed these warnings, but I'm not sure as I was not getting them in the first place. Were these warnings that you were getting, or someone else? I would need to know what the build environment was that produces these warnings, so I can compare with and without the fixes. BTW... I created a discussion detailing what I used to build with Qt6 here: https://github.com/orgs/FashionFreedom/discussions/996 |
I was able to trigger the warnings outlined in this issue by setting to the debugger with the MSVC windows kit: |
With Qt 6.2, MSVC 2019, and Qt Creator 10.01 on Windows 10 64-bit (Desktop_Qt_6_2_4_MSVC2019_64bit)
The following issues appear during compiling:
The text was updated successfully, but these errors were encountered: