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

Port KIO::OpenUrlJob

parent 0deaa8b6
......@@ -2376,10 +2376,18 @@ void ViewerPrivate::slotOpenInBrowser()
void ViewerPrivate::slotExportHtmlPageSuccess(const QString &filename)
{
const QUrl url(QUrl::fromLocalFile(filename));
#if KIO_VERSION < QT_VERSION_CHECK(5, 71, 0)
KRun::RunFlags flags;
flags |= KRun::DeleteTemporaryFiles;
KRun::runUrl(url, QStringLiteral("text/html"), q, flags);
#else
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(url, QStringLiteral("text/html"), q);
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, q));
job->setDeleteTemporaryFile(true);
job->start();
#endif
Q_EMIT printingFinished();
}
......
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