summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-22 07:56:40 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-22 07:56:51 (GMT)
commitc090cc139f02ba54624bf93da6adc26de161234d (patch)
tree869bde8a5b70d0422576f7d639b9347069650ff2
parentf28815f08de6a8799f6fe7a8ddffc4d4cd785e3b (diff)
Increase privacy
-rw-r--r--messageviewer/src/viewer/webengine/mailwebenginepage.cpp8
-rw-r--r--messageviewer/src/viewer/webengine/mailwebenginepage.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/messageviewer/src/viewer/webengine/mailwebenginepage.cpp b/messageviewer/src/viewer/webengine/mailwebenginepage.cpp
index 894f4e6..f8401d5 100644
--- a/messageviewer/src/viewer/webengine/mailwebenginepage.cpp
+++ b/messageviewer/src/viewer/webengine/mailwebenginepage.cpp
@@ -73,6 +73,9 @@ void MailWebEnginePage::initialize()
const QFontInfo font(QFontDatabase().systemFont(QFontDatabase::GeneralFont));
settings()->setFontFamily(QWebEngineSettings::StandardFont, font.family());
settings()->setFontSize(QWebEngineSettings::DefaultFontSize, font.pixelSize());
+ connect(this, &QWebEnginePage::featurePermissionRequested,
+ this, &MailWebEnginePage::slotFeaturePermissionRequested);
+
}
void MailWebEnginePage::setPrintElementBackground(bool printElementBackground)
@@ -83,3 +86,8 @@ void MailWebEnginePage::setPrintElementBackground(bool printElementBackground)
Q_UNUSED(printElementBackground);
#endif
}
+
+void MailWebEnginePage::slotFeaturePermissionRequested(const QUrl& url, QWebEnginePage::Feature feature)
+{
+ setFeaturePermission(url, feature, QWebEnginePage::PermissionDeniedByUser);
+}
diff --git a/messageviewer/src/viewer/webengine/mailwebenginepage.h b/messageviewer/src/viewer/webengine/mailwebenginepage.h
index d42e02c..73ddeee 100644
--- a/messageviewer/src/viewer/webengine/mailwebenginepage.h
+++ b/messageviewer/src/viewer/webengine/mailwebenginepage.h
@@ -35,6 +35,7 @@ public:
void setPrintElementBackground(bool printElementBackground);
private:
+ void slotFeaturePermissionRequested(const QUrl &url, QWebEnginePage::Feature feature);
void initialize();
};
}