Skip to content

qcorowebsocket replace QWebSocket::error with QWebSocket::errorOccurred#174

Merged
danvratil merged 1 commit intoqcoro:mainfrom
nmariusp:work/nmariusp/errorOccured
May 13, 2023
Merged

qcorowebsocket replace QWebSocket::error with QWebSocket::errorOccurred#174
danvratil merged 1 commit intoqcoro:mainfrom
nmariusp:work/nmariusp/errorOccured

Conversation

@nmariusp
Copy link
Contributor

I build using cmake build configuration "Debug" not "RelWithDebInfo".
Building qcoro fails with error "qcoro/qcoro/websockets/qcorowebsocket.cpp: 35:73: error: ‘void QWebSocket::error(QAbstractSocket::SocketError)’ is deprecated: Use errorOccurred instead [-Werror=deprecated-declarations]".
Because "# Only enable strict warnings in debug mode
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Werror -pedantic")".

Copy link
Collaborator

@danvratil danvratil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch. This will need an #ifdef for Qt>=6.5, when the new signal was introduced. And you can remove the qOverload, since there won't be an ambiguity between the signal and a getter anymore.

@nmariusp
Copy link
Contributor Author

OK.
Sorry. I confused ~/kde.6/src/qtwebsockets/src/websockets/qwebsocket.h "error" with /usr/include/x86_64-linux-gnu/qt5/QtCore/qprocess.h "errorOccurred".

I build using cmake build configuration "Debug" not "RelWithDebInfo".
Building qcoro fails with error "qcoro/qcoro/websockets/qcorowebsocket.cpp:
35:73: error: ‘void QWebSocket::error(QAbstractSocket::SocketError)’
is deprecated: Use errorOccurred instead [-Werror=deprecated-declarations]".
Because "# Only enable strict warnings in debug mode
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Werror -pedantic")".
Copy link
Collaborator

@danvratil danvratil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thanks!

@danvratil danvratil enabled auto-merge May 13, 2023 13:17
@danvratil danvratil merged commit 30b27c3 into qcoro:main May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants