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

New api is in 5.86

parent f9eb5aff
Pipeline #75175 failed with stage
in 2 minutes and 48 seconds
......@@ -12,6 +12,7 @@
#include "davutils.h"
#include "folderutils.h"
#include "oxutils.h"
#include <kdav_version.h>
#include <kio/davjob.h>
......@@ -53,10 +54,13 @@ void FolderCreateJob::davJobFinished(KJob *job)
}
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -12,8 +12,8 @@
#include "davutils.h"
#include "oxutils.h"
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
FolderDeleteJob::FolderDeleteJob(const Folder &folder, QObject *parent)
......@@ -49,10 +49,13 @@ void FolderDeleteJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
setError(UserDefinedError);
......
......@@ -12,9 +12,9 @@
#include "davutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -57,10 +57,13 @@ void FolderModifyJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
setError(UserDefinedError);
......
......@@ -12,9 +12,9 @@
#include "davutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -58,9 +58,14 @@ void FolderMoveJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
setError(UserDefinedError);
......
......@@ -13,9 +13,9 @@
#include "folderutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -53,10 +53,13 @@ void FolderRequestJob::davJobFinished(KJob *job)
}
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
setError(UserDefinedError);
......
......@@ -12,7 +12,7 @@
#include "davutils.h"
#include "folderutils.h"
#include "oxutils.h"
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -58,10 +58,13 @@ void FoldersRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -13,9 +13,9 @@
#include "objectutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -79,10 +79,13 @@ void ObjectCreateJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -13,10 +13,10 @@
#include "objectutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <QDomElement>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -54,10 +54,13 @@ void ObjectDeleteJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -13,9 +13,9 @@
#include "objectutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -79,10 +79,13 @@ void ObjectModifyJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -13,9 +13,9 @@
#include "objectutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -59,10 +59,13 @@ void ObjectMoveJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -13,9 +13,9 @@
#include "objectutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -54,10 +54,13 @@ void ObjectRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -13,9 +13,9 @@
#include "objectutils.h"
#include "oxutils.h"
#include <kio/davjob.h>
#include <QDomDocument>
#include <kdav_version.h>
#include <kio/davjob.h>
using namespace OXA;
......@@ -62,10 +62,13 @@ void ObjectsRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -12,6 +12,7 @@
#include "davutils.h"
#include "oxutils.h"
#include <kdav_version.h>
#include <kio/davjob.h>
#include <QDomDocument>
......@@ -54,10 +55,13 @@ void UsersRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
#if KDAV_VERSION > QT_VERSION_CHECK(5, 85, 0)
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
#else
const QDomDocument document = davJob->response();
#endif
QDomElement multistatus = document.documentElement();
QDomElement response = multistatus.firstChildElement(QStringLiteral("response"));
......
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