Commit 51ebef02 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port away from deprecated ERR_SLAVE_DEFINED

parent 4f6c01cb
Pipeline #208523 canceled with stage
in 1 minute and 24 seconds
......@@ -8,6 +8,8 @@
#include <kio/job.h>
#include <util/log.h>
#include <kio_version.h>
namespace bt
{
KIOAnnounceJob::KIOAnnounceJob(const QUrl &url, const KIO::MetaData &md)
......@@ -50,7 +52,11 @@ void KIOAnnounceJob::finished(KJob *j)
error_page = get_job->isErrorPage(); // must be called from slot connected to result()
if (error_page && !j->error()) {
QString err_code = get_job->metaData().value(QStringLiteral("responsecode"));
#if KIO_VERSION >= QT_VERSION_CHECK(5, 96, 0)
setError(KIO::ERR_WORKER_DEFINED);
#else
setError(KIO::ERR_SLAVE_DEFINED);
#endif
setErrorText(QString("HTTP %1").arg(err_code));
} else {
setError(j->error());
......
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