Commit 6c5def1e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Now we depend against kf5.71

parent 95d18d34
Pipeline #23591 canceled with stage
...@@ -23,12 +23,8 @@ ...@@ -23,12 +23,8 @@
#include <KLocalizedString> #include <KLocalizedString>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <viewerplugintoolmanager.h> #include <viewerplugintoolmanager.h>
#include <KRun>
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
#include <KIO/JobUiDelegate> #include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob> #include <KIO/OpenUrlJob>
#endif
#include <KPIMTextEdit/kpimtextedit/texttospeechwidget.h> #include <KPIMTextEdit/kpimtextedit/texttospeechwidget.h>
...@@ -188,17 +184,11 @@ void ArticleViewerWebEngineWidgetNg::slotOpenInBrowser() ...@@ -188,17 +184,11 @@ void ArticleViewerWebEngineWidgetNg::slotOpenInBrowser()
connect(job, &WebEngineViewer::WebEngineExportHtmlPageJob::success, this, &ArticleViewerWebEngineWidgetNg::slotExportHtmlPageSuccess); connect(job, &WebEngineViewer::WebEngineExportHtmlPageJob::success, this, &ArticleViewerWebEngineWidgetNg::slotExportHtmlPageSuccess);
job->start(); job->start();
} else { } else {
#if KIO_VERSION < QT_VERSION_CHECK(5, 71, 0)
KRun::RunFlags flags;
flags |= KRun::RunExecutables;
KRun::runUrl(currentUrl, QStringLiteral("text/html"), this, flags);
#else
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(currentUrl, QStringLiteral("text/html")); KIO::OpenUrlJob *job = new KIO::OpenUrlJob(currentUrl, QStringLiteral("text/html"));
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this)); job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->setDeleteTemporaryFile(true); job->setDeleteTemporaryFile(true);
job->setRunExecutables(true); job->setRunExecutables(true);
job->start(); job->start();
#endif
} }
} }
...@@ -209,15 +199,8 @@ void ArticleViewerWebEngineWidgetNg::slotExportHtmlPageFailed() ...@@ -209,15 +199,8 @@ void ArticleViewerWebEngineWidgetNg::slotExportHtmlPageFailed()
void ArticleViewerWebEngineWidgetNg::slotExportHtmlPageSuccess(const QString &filename) void ArticleViewerWebEngineWidgetNg::slotExportHtmlPageSuccess(const QString &filename)
{ {
#if KIO_VERSION < QT_VERSION_CHECK(5, 71, 0)
const QUrl url(QUrl::fromLocalFile(filename));
KRun::RunFlags flags;
flags |= KRun::DeleteTemporaryFiles;
KRun::runUrl(url, QStringLiteral("text/html"), this, flags);
#else
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(QUrl::fromLocalFile(filename), QStringLiteral("text/html")); KIO::OpenUrlJob *job = new KIO::OpenUrlJob(QUrl::fromLocalFile(filename), QStringLiteral("text/html"));
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this)); job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->setDeleteTemporaryFile(true); job->setDeleteTemporaryFile(true);
job->start(); job->start();
#endif
} }
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "frame.h" #include "frame.h"
#include "actionmanager.h" #include "actionmanager.h"
#include "openurlrequest.h" #include "openurlrequest.h"
#include <KRun>
#include <KMacroExpander> #include <KMacroExpander>
#include <KProcess> #include <KProcess>
#include <KShell> #include <KShell>
...@@ -36,11 +35,8 @@ ...@@ -36,11 +35,8 @@
#include <webengine/webengineframe.h> #include <webengine/webengineframe.h>
#include <QStringList> #include <QStringList>
#include <QDesktopServices> #include <QDesktopServices>
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
#include <KIO/JobUiDelegate> #include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob> #include <KIO/OpenUrlJob>
#endif
using namespace Akregator; using namespace Akregator;
...@@ -245,13 +241,8 @@ void FrameManager::openInExternalBrowser(const OpenUrlRequest &request) ...@@ -245,13 +241,8 @@ void FrameManager::openInExternalBrowser(const OpenUrlRequest &request)
if (request.args().mimeType().isEmpty()) { if (request.args().mimeType().isEmpty()) {
QDesktopServices::openUrl(url); QDesktopServices::openUrl(url);
} else { } else {
#if KIO_VERSION < QT_VERSION_CHECK(5, 71, 0)
KRun::RunFlags flag = {};
KRun::runUrl(url, request.args().mimeType(), nullptr /*window*/, flag);
#else
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(url, request.args().mimeType()); KIO::OpenUrlJob *job = new KIO::OpenUrlJob(url, request.args().mimeType());
job->start(); job->start();
#endif
} }
} }
......
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