X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwidgets%2FTabWidget.cpp;h=aee71d73820d3db97c3f3e2ac433be8731fddb47;hb=5f747e35e3555da6a0f89f0444163d578ab1db22;hp=4edb304d0db6c45ed5d757a6d4a5f6cd20ad5596;hpb=06a69a2d38bf73c0c5219f94c345b19142bb1646;p=PrivacyBrowserPC.git diff --git a/src/widgets/TabWidget.cpp b/src/widgets/TabWidget.cpp index 4edb304..aee71d7 100644 --- a/src/widgets/TabWidget.cpp +++ b/src/widgets/TabWidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2022 Soren Stoutner . + * Copyright 2022-2023 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -267,7 +267,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const return false; }); - // Disable JavaScript by default (this prevetns JavaScript from being enabled on a new tab before domain settings are loaded). + // Disable JavaScript by default (this prevents JavaScript from being enabled on a new tab before domain settings are loaded). webEngineSettingsPointer->setAttribute(QWebEngineSettings::JavascriptEnabled, false); // Don't allow JavaScript to open windows. @@ -285,6 +285,12 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const // Limit WebRTC to public IP addresses. webEngineSettingsPointer->setAttribute(QWebEngineSettings::WebRTCPublicInterfacesOnly, true); + // Enable the PDF viewer (it should be enabled by default, but it is nice to be explicit in case the defaults change). + webEngineSettingsPointer->setAttribute(QWebEngineSettings::PdfViewerEnabled, true); + + // Plugins must be enabled for the PDF viewer to work. + webEngineSettingsPointer->setAttribute(QWebEngineSettings::PluginsEnabled, true); + // Update the cookies action. connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::updateCookiesAction, [privacyWebEngineViewPointer, this] (const int numberOfCookies) {