Commit 7c4465a2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port KRun:: deprecated method

parent 4e355d82
Pipeline #21437 passed with stage
in 6 minutes and 33 seconds
...@@ -209,8 +209,15 @@ void ArticleViewerWebEngineWidgetNg::slotExportHtmlPageFailed() ...@@ -209,8 +209,15 @@ 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)); const QUrl url(QUrl::fromLocalFile(filename));
KRun::RunFlags flags; KRun::RunFlags flags;
flags |= KRun::DeleteTemporaryFiles; flags |= KRun::DeleteTemporaryFiles;
KRun::runUrl(url, QStringLiteral("text/html"), this, flags); KRun::runUrl(url, QStringLiteral("text/html"), this, flags);
#else
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(QUrl::fromLocalFile(filename), QStringLiteral("text/html"));
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->setDeleteTemporaryFile(true);
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