Commit eaef47a3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated method against qt5.15

parent fd491e9e
......@@ -75,7 +75,7 @@ endif(BUILD_TESTING)
########### Targets ###########
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054600)
endif()
......
......@@ -176,7 +176,11 @@ void GoogleTranslator::translate()
const QNetworkRequest request(url);
QNetworkReply *reply = mNetworkAccessManager->get(request);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error), this, &GoogleTranslator::slotError);
#else
connect(reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::errorOccurred), this, &GoogleTranslator::slotError);
#endif
}
void GoogleTranslator::slotError(QNetworkReply::NetworkError /*error*/)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment