Commit 0f7e3a54 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port with new kdav api

parent ee060de3
Pipeline #74815 passed with stage
in 14 minutes and 58 seconds
......@@ -158,7 +158,7 @@ set_package_properties(Qt5Keychain PROPERTIES
option(KDEPIM_RUN_ISOLATED_TESTS "Run the isolated tests." FALSE)
#add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055500)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055600)
find_package(Xsltproc)
set_package_properties(Xsltproc PROPERTIES DESCRIPTION "XSLT processor from libxslt" TYPE REQUIRED PURPOSE "Required to generate D-Bus interfaces for all Akonadi resources.")
add_definitions(-DQT_NO_EMIT)
......
......@@ -7,9 +7,9 @@
#include "davfreebusyhandler.h"
#include "settings.h"
#include <KDAV/DavCollectionsFetchJob>
#include <KDAV/DavPrincipalSearchJob>
#include <QDomElement>
#include "davresource_debug.h"
#include <KCalendarCore/ICalFormat>
......
......@@ -54,7 +54,9 @@ void FolderCreateJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -49,7 +49,9 @@ void FolderDeleteJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -14,6 +14,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
FolderModifyJob::FolderModifyJob(const Folder &folder, QObject *parent)
......@@ -55,8 +57,10 @@ void FolderModifyJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
setError(UserDefinedError);
......
......@@ -14,6 +14,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
FolderMoveJob::FolderMoveJob(const Folder &folder, const Folder &destinationFolder, QObject *parent)
......@@ -56,8 +58,9 @@ void FolderMoveJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
setError(UserDefinedError);
......
......@@ -15,6 +15,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
FolderRequestJob::FolderRequestJob(const Folder &folder, QObject *parent)
......@@ -52,8 +54,9 @@ void FolderRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
setError(UserDefinedError);
......
......@@ -58,7 +58,10 @@ void FoldersRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -15,6 +15,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
ObjectCreateJob::ObjectCreateJob(const Object &object, QObject *parent)
......@@ -77,7 +79,10 @@ void ObjectCreateJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -15,6 +15,9 @@
#include <kio/davjob.h>
#include <QDomDocument>
#include <QDomElement>
using namespace OXA;
ObjectDeleteJob::ObjectDeleteJob(const Object &object, QObject *parent)
......@@ -51,7 +54,10 @@ void ObjectDeleteJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -15,6 +15,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
ObjectModifyJob::ObjectModifyJob(const Object &object, QObject *parent)
......@@ -77,7 +79,10 @@ void ObjectModifyJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -15,6 +15,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
ObjectMoveJob::ObjectMoveJob(const Object &object, const Folder &destinationFolder, QObject *parent)
......@@ -57,7 +59,10 @@ void ObjectMoveJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -15,6 +15,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
ObjectRequestJob::ObjectRequestJob(const Object &object, QObject *parent)
......@@ -52,7 +54,10 @@ void ObjectRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -15,6 +15,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
ObjectsRequestJob::ObjectsRequestJob(const Folder &folder, qulonglong lastSync, Mode mode, QObject *parent)
......@@ -60,7 +62,10 @@ void ObjectsRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QString errorText, errorStatus;
if (DAVUtils::davErrorOccurred(document, errorText, errorStatus)) {
......
......@@ -14,6 +14,8 @@
#include <kio/davjob.h>
#include <QDomDocument>
using namespace OXA;
UsersRequestJob::UsersRequestJob(QObject *parent)
......@@ -52,7 +54,10 @@ void UsersRequestJob::davJobFinished(KJob *job)
auto davJob = qobject_cast<KIO::DavJob *>(job);
const QDomDocument document = davJob->response();
const QByteArray ba = davJob->responseData();
QDomDocument document;
document.setContent(ba);
QDomElement multistatus = document.documentElement();
QDomElement response = multistatus.firstChildElement(QStringLiteral("response"));
......
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