diff --git a/kioslave/pop3/pop3.cpp b/kioslave/pop3/pop3.cpp --- a/kioslave/pop3/pop3.cpp +++ b/kioslave/pop3/pop3.cpp @@ -41,8 +41,14 @@ #include #include +#include +#if KIO_VERSION >= QT_VERSION_CHECK(5, 65, 0) +#include +#else +#include +#endif + #include -#include #define GREETING_BUF_LEN 1024 #define MAX_RESPONSE_LEN 512 @@ -622,7 +628,11 @@ || metaData(QStringLiteral("useProxy")) != QLatin1String("on")) { qCDebug(POP3_LOG) << "requested to use no proxy"; +#if KIO_VERSION >= QT_VERSION_CHECK(5, 65, 0) + QSslSocket *sock = qobject_cast(socket()); +#else KTcpSocket *sock = qobject_cast(socket()); +#endif if (sock) { QNetworkProxy proxy; proxy.setType(QNetworkProxy::NoProxy); diff --git a/resources/pop3/autotests/fakeserver/fakeserver.h b/resources/pop3/autotests/fakeserver/fakeserver.h --- a/resources/pop3/autotests/fakeserver/fakeserver.h +++ b/resources/pop3/autotests/fakeserver/fakeserver.h @@ -75,8 +75,8 @@ // We use one big mutex to protect everything // There shouldn't be deadlocks, as there are only 2 places where the functions - // are called: From the KTcpSocket signals, which are triggered by the POP3 ioslave, - // and from the actual test. + // are called: From the KTcpSocket (or QSslSocket with KIO >= 5.65) signals, which + // are triggered by the POP3 ioslave, and from the actual test. mutable QMutex mMutex; };