From 33322e5c9bc047b474b4d9e88a629cb27651096d Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Thu, 16 Jul 2020 13:42:02 +0200 Subject: [PATCH] Register cidScheme --- src/CMakeLists.txt | 1 + src/main.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 20ca330b9..1b7e1dbf2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -403,6 +403,7 @@ target_link_libraries(kmail KF5::TemplateParser KF5::Libkdepim KF5::Crash + KF5::WebEngineViewer ${kmail_userfeedback_LIB} ) diff --git a/src/main.cpp b/src/main.cpp index 0f50a8eb3..1083474c7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,10 +33,12 @@ #include #include #include +#include #ifdef WITH_KUSERFEEDBACK #include #include "userfeedback/kmailuserfeedbackprovider.h" + #endif //----------------------------------------------------------------------------- @@ -124,6 +126,12 @@ int main(int argc, char *argv[]) QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); + //Necessary for "cid" support in kmail. + QWebEngineUrlScheme cidScheme("cid"); + cidScheme.setFlags(QWebEngineUrlScheme::SecureScheme | QWebEngineUrlScheme::ContentSecurityPolicyIgnored); + cidScheme.setSyntax(QWebEngineUrlScheme::Syntax::Path); + QWebEngineUrlScheme::registerScheme(cidScheme); + KMailApplication app(argc, &argv); KLocalizedString::setApplicationDomain("kmail"); app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kmail")));