Commit e77f3321 authored by Laurent Montel's avatar Laurent Montel 😁

Don't use deprecated method

parent d3010f2e
......@@ -320,8 +320,10 @@ void ViewerPrivate::openAttachment(KMime::Content *node, const QUrl &url)
}
if (node->contentType()->mimeType() == "message/external-body") {
if (node->contentType()->hasParameter(QStringLiteral("url"))) {
KRun::RunFlags flags;
flags |= KRun::RunExecutables;
const QString url = node->contentType()->parameter(QStringLiteral("url"));
KRun::runUrl(QUrl(url), QStringLiteral("text/html"), q);
KRun::runUrl(QUrl(url), QStringLiteral("text/html"), q, flags);
return;
}
}
......@@ -2317,7 +2319,10 @@ void ViewerPrivate::slotOpenInBrowser()
void ViewerPrivate::slotExportHtmlPageSuccess(const QString &filename)
{
const QUrl url(QUrl::fromLocalFile(filename));
KRun::runUrl(url, QStringLiteral("text/html"), q, true);
KRun::RunFlags flags;
flags |= KRun::DeleteTemporaryFiles;
KRun::runUrl(url, QStringLiteral("text/html"), q, flags);
Q_EMIT printingFinished();
}
......
......@@ -73,4 +73,3 @@ add_executable(testmailmboxwebengine ${testmailmboxwebengine_test_SRCS})
target_link_libraries(testmailmboxwebengine
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::MessageViewer
)
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