Commit 22d6c435 authored by Volker Krause's avatar Volker Krause
Browse files

Port away from deprecated API in KIO 5.84

parent a23bab06
Pipeline #69958 canceled with stage
......@@ -25,8 +25,6 @@ extern "C" {
#include <QSslSocket>
#include "kio_version.h"
#include <KTcpSocket>
#include <kio/slaveinterface.h>
#include <string.h>
......@@ -611,15 +609,9 @@ bool POP3Protocol::pop3_open()
if (!hasMetaData(QStringLiteral("useProxy")) || metaData(QStringLiteral("useProxy")) != QLatin1String("on")) {
qCDebug(POP3_LOG) << "requested to use no proxy";
// the KTcpSocket branch can be removed once we can require KF >= 5.65 as TCPSlaveBase will
// use QSslSocket internally
QNetworkProxy proxy;
proxy.setType(QNetworkProxy::NoProxy);
//#if KIO_VERSION < QT_VERSION_CHECK(5, 83, 0)
if (auto sock = qobject_cast<QSslSocket *>(socket())) {
//#else
// if (auto sock = qobject_cast<QSslSocket *>(tcpSocket())) {
//#endif
if (auto sock = tcpSocket()) {
sock->setProxy(proxy);
} else {
qCWarning(POP3_LOG) << "no socket, cannot set no proxy";
......
......@@ -48,7 +48,7 @@ KIO::DavJob *DavManager::createFindJob(const QString &path, const QDomDocument &
QUrl url(mBaseUrl);
url.setPath(path);
return KIO::davPropFind(url, document, QStringLiteral("0"), KIO::HideProgressInfo);
return KIO::davPropFind(url, document.toString(), QStringLiteral("0"), KIO::HideProgressInfo);
}
KIO::DavJob *DavManager::createPatchJob(const QString &path, const QDomDocument &document) const
......@@ -56,5 +56,5 @@ KIO::DavJob *DavManager::createPatchJob(const QString &path, const QDomDocument
QUrl url(mBaseUrl);
url.setPath(path);
return KIO::davPropPatch(url, document, KIO::HideProgressInfo);
return KIO::davPropPatch(url, document.toString(), KIO::HideProgressInfo);
}
Supports Markdown
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