-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix annoying Qt5 deprecated warnings #5598
Comments
Is your proposed fix to suppress these warnings, or to update the code to avoid deprecated code? |
I think they should be fixed properly. Suppressing deprecate warnings does not seem good to me. |
Ok great, that's what I was thinking as well. Just wanted clarification since it wasn't mentioned in the issue. |
I would like to work on this if nobody else is doing it. |
@uthidata Thanks for your reply. Currently no one volunteered, so you can do it. |
I encountered an issue while trying to fix the QWheelEvent warnings In Automation Editor, when the user press Ctrl + Alt while scrolling, the quantize model should change. The suggested fix is to turn it into I want to work around this by adding the x and y values, with the assumption that people would not scroll on both axes at the same time. If you have other ideas, please tell me. |
Good found. The sum can also be retrieved using |
Sadly manhattanLength returns the sum of absolute values whereas we need signed values. I will use .x and .y for now. |
The results of PR #5619 shows that my fixes are not appropriate for Qt 5.12, since some of the functions that show up as deprecated on my machine is not yet there until Qt 5.14, namely:
The result being that it could not build for Ubuntu 16.04. |
@PhysSong what do you think? |
Well, scratch that, it cannot build for Ubuntu 20.04 either. Qt 5.14 is planned to land in Ubuntu 20.10. I'm thinking of guarding these specific parts with preprocessors, and add a
|
Good idea. If it happens more often you may want to wrap this into a function, like |
Ok, so this is what I'm going to do:
|
Some comments:
I think we should first try not breaking builds with old Qt5 releases. |
Thanks for the feedback. I've made it so that it still runs on older versions of Qt. I've also added preprocessor switches for some of these parts, along with a deprecation message printed with Compared to master branch, these warnings have dropped from 2800ish to 200ish lines on my machine (Qt 5.15). The PR now builds on all configurations. Please check #5619. |
I'm not sure how useful the |
Understandable, I will do a quick rebase along with the formatting. |
Bug Summary
LMMS brings tons of Qt5 deprecated warnings (e.g.
QFlag
) which can make it hard to see relevant compiler issues. The warnings are justified, they should be fixed (suppressing them would not be the solution).Steps to reproduce
Compile LMMS (master) with Qt5.
Expected behavior
No Qt5 warnings.
Actual behavior
Tons of Qt5 warnings (e.g.
QFlag
, see Logs; has theQString
warning already been fixed?)Affected LMMS versions
At least on master.
Logs
Click to expand
The text was updated successfully, but these errors were encountered: