Commit 9d91b84c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Now we depend against kf5.71

parent d4b4e801
Pipeline #23592 canceled with stage
......@@ -69,13 +69,8 @@ using namespace KCalendarCore;
#include "text_calendar_debug.h"
#include <KMessageBox>
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#else
#include <KRun>
#endif
#include <KIO/FileCopyJob>
#include <KIO/StatJob>
#include <KLocalizedString>
......@@ -1055,15 +1050,9 @@ public:
file->write(QByteArray::fromBase64(attachment.data()));
file->close();
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(QUrl::fromLocalFile(file->fileName()), attachment.mimeType());
job->setDeleteTemporaryFile(true);
job->start();
#else
KRun::RunFlags flags;
flags |= KRun::DeleteTemporaryFiles;
KRun::runUrl(QUrl::fromLocalFile(file->fileName()), attachment.mimeType(), nullptr, flags);
#endif
delete file;
}
}
......
......@@ -23,13 +23,8 @@
#include "adblockutil.h"
#include "adblockmanager.h"
#include <WebEngineViewer/WebEngineScript>
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#else
#include <KRun>
#endif
#include <QVBoxLayout>
#include <KLocalizedString>
#include <CustomTreeView>
......@@ -163,15 +158,10 @@ void AdBlockBlockableItemsWidget::slotOpenItem()
return;
}
const QUrl url(item->text(Url));
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(url);
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->setRunExecutables(false);
job->start();
#else
KRun *runner = new KRun(url, this); // will delete itself
runner->setRunExecutables(false);
#endif
}
void AdBlockBlockableItemsWidget::slotBlockItem()
......
......@@ -55,12 +55,8 @@ using namespace PimCommon::ConfigureImmutableWidgetUtils;
#include <QPointer>
#include <QStandardPaths>
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#else
#include <KRun>
#endif
#include <adblocksubscription.h>
using namespace AdBlock;
......@@ -174,13 +170,9 @@ bool AdBlockSettingWidget::event(QEvent *event)
{
if (event->type() == QEvent::WhatsThisClicked) {
QWhatsThisClickedEvent *clicked = static_cast<QWhatsThisClickedEvent *>(event);
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(QUrl(clicked->href()));
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->start();
#else
new KRun(QUrl(clicked->href()), this);
#endif
return true;
}
return QWidget::event(event);
......
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