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

Fix compile against kio 5.69.0

parent 6ee75428
......@@ -31,6 +31,7 @@
#include "attachmenthandler.h"
#include "calendarsupport_debug.h"
#include "calendarsupport/utils.h"
#include <kio_version.h>
#include <ItemFetchJob>
......@@ -109,7 +110,12 @@ Attachment AttachmentHandler::find(const QString &attachmentName, const Incidenc
}
if (a.isUri()) {
#if KIO_VERSION < QT_VERSION_CHECK(5, 69, 0)
auto job = KIO::stat(QUrl(a.uri()), KIO::StatJob::SourceSide, 0);
#else
auto job = KIO::statDetails(QUrl(a.uri()), KIO::StatJob::SourceSide, KIO::StatDetail::Basic);
#endif
KJobWidgets::setWindow(job, d->mParent);
if (!job->exec()) {
KMessageBox::sorry(
......
......@@ -26,7 +26,7 @@
#include "kcalprefs.h"
#include "utils.h"
#include <kio_version.h>
#include <Akonadi/Calendar/IncidenceChanger>
#include <KCalendarCore/ICalFormat>
......@@ -245,7 +245,12 @@ void EventArchiver::archiveIncidences(const Akonadi::ETMCalendar::Ptr &calendar,
if (archiveURL.isLocalFile()) {
fileExists = QFile::exists(archiveURL.toLocalFile());
} else {
#if KIO_VERSION < QT_VERSION_CHECK(5, 69, 0)
auto job = KIO::stat(archiveURL, KIO::StatJob::SourceSide, 0);
#else
auto job = KIO::statDetails(archiveURL, KIO::StatJob::SourceSide, KIO::StatDetail::Basic);
#endif
KJobWidgets::setWindow(job, widget);
fileExists = job->exec();
}
......
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