-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 Qt 5.15.2 deprecation warnings #3380
Merged
uklotzde
merged 4 commits into
mixxxdj:2.3
from
Holzhaus:qt-deprecations-warnings-5.15.2
Nov 28, 2020
Merged
Fix Qt 5.15.2 deprecation warnings #3380
uklotzde
merged 4 commits into
mixxxdj:2.3
from
Holzhaus:qt-deprecations-warnings-5.15.2
Nov 28, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes these warnings when compiling with Qt 5.15.2: In file included from src/widget/wknob.h:12, from src/controllers/controllerlearningeventfilter.cpp:6: src/widget/knobeventhandler.h: In member function ‘void KnobEventHandler<T>::mousePressEvent(T*, QMouseEvent*)’: src/widget/knobeventhandler.h:62:22: error: ‘Qt::MidButton’ is deprecated: MidButton is deprecated. Use MiddleButton instead [-Werror=deprecated-declarations] 62 | case Qt::MidButton: | ^~~~~~~~~ In file included from /usr/include/qt/QtCore/qbytearray.h:45, from /usr/include/qt/QtCore/qstring.h:50, from /usr/include/qt/QtCore/qhashfunctions.h:44, from /usr/include/qt/QtCore/qlist.h:47, from /usr/include/qt/QtCore/qhash.h:46, from /usr/include/qt/QtCore/qdebug.h:45, from /usr/include/qt/QtCore/QtDebug:1, from src/controllers/controllerlearningeventfilter.cpp:1: /usr/include/qt/QtCore/qnamespace.h:132:9: note: declared here 132 | MidButton Q_DECL_ENUMERATOR_DEPRECATED_X("MidButton is deprecated. Use MiddleButton instead") = MiddleButton, | ^~~~~~~~~ In file included from src/widget/wknob.h:12, from src/controllers/controllerlearningeventfilter.cpp:6: src/widget/knobeventhandler.h: In member function ‘void KnobEventHandler<T>::mouseReleaseEvent(T*, QMouseEvent*)’: src/widget/knobeventhandler.h:77:22: error: ‘Qt::MidButton’ is deprecated: MidButton is deprecated. Use MiddleButton instead [-Werror=deprecated-declarations] 77 | case Qt::MidButton: | ^~~~~~~~~ In file included from /usr/include/qt/QtCore/qbytearray.h:45, from /usr/include/qt/QtCore/qstring.h:50, from /usr/include/qt/QtCore/qhashfunctions.h:44, from /usr/include/qt/QtCore/qlist.h:47, from /usr/include/qt/QtCore/qhash.h:46, from /usr/include/qt/QtCore/qdebug.h:45, from /usr/include/qt/QtCore/QtDebug:1, from src/controllers/controllerlearningeventfilter.cpp:1: /usr/include/qt/QtCore/qnamespace.h:132:9: note: declared here 132 | MidButton Q_DECL_ENUMERATOR_DEPRECATED_X("MidButton is deprecated. Use MiddleButton instead") = MiddleButton, | ^~~~~~~~~
Fixes: src/network/jsonwebtask.cpp: In function ‘QNetworkRequest mixxx::network::{anonymous}::newRequest(const QUrl&)’: src/network/jsonwebtask.cpp:104:43: error: ‘QNetworkRequest::FollowRedirectsAttribute’ is deprecated: Use RedirectPolicyAttribute [-Werror=deprecated-declarations] 104 | request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/qt/QtNetwork/qnetworkaccessmanager.h:44, from /usr/include/qt/QtNetwork/QNetworkAccessManager:1, from src/network/webtask.h:4, from src/network/jsonwebtask.h:7, from src/network/jsonwebtask.cpp:1: /usr/include/qt/QtNetwork/qnetworkrequest.h:97:9: note: declared here 97 | FollowRedirectsAttribute Q_DECL_ENUMERATOR_DEPRECATED_X("Use RedirectPolicyAttribute"), | ^~~~~~~~~~~~~~~~~~~~~~~~
src/widget/wspinny.cpp: In member function ‘virtual void WSpinny::mouseMoveEvent(QMouseEvent*)’: src/widget/wspinny.cpp:593:35: error: ‘Qt::MidButton’ is deprecated: MidButton is deprecated. Use MiddleButton instead [-Werror=deprecated-declarations] 593 | } else if (e->buttons() & Qt::MidButton) { | ^~~~~~~~~ In file included from /usr/include/qt/QtCore/qcoreevent.h:43, from /usr/include/qt/QtCore/QEvent:1, from src/widget/wspinny.h:5, from src/widget/wspinny.cpp:1: /usr/include/qt/QtCore/qnamespace.h:132:9: note: declared here 132 | MidButton Q_DECL_ENUMERATOR_DEPRECATED_X("MidButton is deprecated. Use MiddleButton instead") = MiddleButton, | ^~~~~~~~~
Holzhaus
changed the title
Fix Qt 5.15.2 deprecations warnings
Fix Qt 5.15.2 deprecation warnings
Nov 28, 2020
src/widget/wpushbutton.cpp: In member function ‘virtual bool WPushButton::event(QEvent*)’: src/widget/wpushbutton.cpp:453:59: error: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = Qt::KeyboardModifier; QFlags<T>::Zero = int QFlags<Qt::KeyboardModifier>::Private::*]’ is deprecated: Use default constructor instead [-Werror=deprecated-declarations] 453 | Qt::MouseEventSynthesizedByApplication); | ^ In file included from /usr/include/qt/QtCore/qglobal.h:1304, from /usr/include/qt/QtGui/qtguiglobal.h:43, from /usr/include/qt/QtGui/qevent.h:43, from /usr/include/qt/QtGui/QPaintEvent:1, from src/widget/wpushbutton.h:21, from src/widget/wpushbutton.cpp:18: /usr/include/qt/QtCore/qflags.h:123:80: note: declared here 123 | QT_DEPRECATED_X("Use default constructor instead") Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {} |
uklotzde
approved these changes
Nov 28, 2020
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.