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 Deprecation warnings with Qt 5.15 (and 5.14) #5616
Conversation
aba1201
to
4efaf79
Compare
4efaf79
to
9c8db45
Compare
b5c2577
to
8538c92
Compare
3128dd1
to
66073c9
Compare
@@ -552,7 +552,7 @@ GridView { | |||
// force not hiding palette cell if it is being dragged to a score | |||
enabled: paletteCell.paletteDrag | |||
target: mscore | |||
onElementDraggedToScoreView: paletteCell.paletteDrag = false | |||
function onElementDraggedToScoreView() { paletteCell.paletteDrag = false; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't detect any negative impact of this and the other similar changes to qml files in the PR on the AppVeyor Build using Qt 5.9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Cannot"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? This is intended to be a handler to existing signal, not a standalone function. I am not sure whether it will work so if declared with function
keyword.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Cannot"?
right, corrected
Why is this needed? This is intended to be a handler to existing signal, not a standalone function. I am not sure whether it will work so if declared with
function
keyword.
Well, as written, I'm not really sure what I'm doing here, but did exactly as that runtime warning told me to do, and it seems to work in Qt 5.15 as well as in 5.9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does that warning say?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning: qrc:/qml/palettes/Palette.qml:551:13: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... } (qrc:/qml/palettes/Palette.qml:551, )
c3d260b
to
da908da
Compare
Ouch. Rebase needed… |
done ;-) |
8be7263
to
9901b15
Compare
27e16d6
to
9077769
Compare
9e7b3bf
to
d8368bb
Compare
70d8820
to
6a71eb2
Compare
* fix 383 warnings C4996 (deprecated) with one single line change * fix 5 'empty' warnings about invalid slots, not sure the remaining slots serve any purpose though * disable warnings C4127 and C4996 for thirdparty/google_analytics * fix 30 warnings C4996 using the suggested alternatives available since at least Qt 5.9, so won't break building against that * change as requested in code review plus some more fixes using the same idea * fixing yet more warnings * disable deprecation warnings in qoogle_analytics for MinGW too although I believe maxOS and Linux may use those too. Easy to extend to those, if need be. * Fix qml runtime warnings exactly following the advice given by that warning, but without really know what I'm doing here or whether that is still backwards compatible to Qt 5.9. * Use replacements as suggested, if available and no `endl` neded with `qDebug()` * fix 24 more * 2 more * 7 more (one only seen in DEBUG mode) * Fix the `endl` warnings * maybe more changes this way? * Add all warnings C5999 or bigger to the ignore list for telemetry with Qt 5.15 Beta 1 as avoiding only C26439, C26444,C 26452, C26495, C26498, C26812 isn't possible * fix 2 deprecation warning new with Qt 5.15 beta 1 * fix 4 new warnings and also Qt 5.12 builds, disable some dead code * fix deprecation warnings new with Qt 5.15's MSVC 2019 integration and revert some (`QNetworkReply::networkError()`) that Qt 5.15 beta 2 reverted too * fix warning reg. obsolete operator < for QVariants * revert changes needed prior to beta 3 And clarifying some earlier changes * mark ToDos * fix warning reg QString()::null * fix a 'regression' from a revert of an earlier change
at least those that are backwards compatible to at least Qt 5.9.
There are several hundred such (MSVC) warnings (557 C4996 in MSVC 2017, 680 in MSVC 2019, plus 5 'empty' ones) resp. 716 warnings (-Wdeprecated-declarations in MinGW, more than MSVC, due to being build in DEBUG mode), this PR fixes all but 5 (MSVC 2017), 16 (MSVC 2019), 17 (MinGW) of those.
The remaining few seem to require the use of replacements that are not properly documented, possibly due to a Qt 5.15 documentation not being available yet (and/or don't work with Qt 5.9), at least I'm at a loss about what to do with them.
Here are the remaining ones (marked with ToDo comments for now):
Hints how/whether to deal with those would be very welcome...