webEngineSettingsPointer->setAttribute(QWebEngineSettings::PluginsEnabled, true);
// Update the blocked requests action.
- connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::requestBlocked, [this, privacyWebEngineViewPointer] (const int blockedRequests)
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::requestBlocked, [this, privacyWebEngineViewPointer] (const QVector<int> blockedRequestsVector)
{
// Update the blocked requests action if the specified privacy WebEngine view is the current privacy WebEngine view.
if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
- emit blockedRequestsUpdated(blockedRequests);
+ emit blockedRequestsUpdated(blockedRequestsVector);
});
// Update the cookies action.
currentPrivacyWebEngineViewPointer->reload();
}
+void TabWidget::toggleEasyList() const
+{
+ // Toggle EasyList.
+ currentPrivacyWebEngineViewPointer->easyListEnabled = !currentPrivacyWebEngineViewPointer->easyListEnabled;
+
+ // Reload the website.
+ currentPrivacyWebEngineViewPointer->reload();
+}
+
+void TabWidget::toggleEasyPrivacy() const
+{
+ // Toggle EasyPrivacy.
+ currentPrivacyWebEngineViewPointer->easyPrivacyEnabled = !currentPrivacyWebEngineViewPointer->easyPrivacyEnabled;
+
+ // Reload the website.
+ currentPrivacyWebEngineViewPointer->reload();
+}
+
+void TabWidget::toggleFanboysAnnoyanceList() const
+{
+ // Toggle Fanboy's Annoyance List.
+ currentPrivacyWebEngineViewPointer->fanboysAnnoyanceListEnabled = !currentPrivacyWebEngineViewPointer->fanboysAnnoyanceListEnabled;
+
+ // Reload the website.
+ currentPrivacyWebEngineViewPointer->reload();
+}
+
void TabWidget::toggleFindCaseSensitive(const QString &text)
{
// Toggle find case sensitive.
currentPrivacyWebEngineViewPointer->reload();
}
+void TabWidget::toggleUltraList() const
+{
+ // Toggle UltraList.
+ currentPrivacyWebEngineViewPointer->ultraListEnabled = !currentPrivacyWebEngineViewPointer->ultraListEnabled;
+
+ // Reload the website.
+ currentPrivacyWebEngineViewPointer->reload();
+}
+
+void TabWidget::toggleUltraPrivacy() const
+{
+ // Toggle UltraPrivacy.
+ currentPrivacyWebEngineViewPointer->ultraPrivacyEnabled = !currentPrivacyWebEngineViewPointer->ultraPrivacyEnabled;
+
+ // Reload the website.
+ currentPrivacyWebEngineViewPointer->reload();
+}
+
void TabWidget::updateDownloadDirectory(QString newDownloadDirectory) const
{
// Remove the file name from the save file path.
if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
{
// Update the UI.
+ emit easyListStatusChanged(currentPrivacyWebEngineViewPointer->easyListEnabled);
+ emit easyPrivacyStatusChanged(currentPrivacyWebEngineViewPointer->easyPrivacyEnabled);
+ emit fanboysAnnoyanceListStatusChanged(currentPrivacyWebEngineViewPointer->fanboysAnnoyanceListEnabled);
+ emit ultraListStatusChanged(currentPrivacyWebEngineViewPointer->ultraListEnabled);
+ emit ultraPrivacyStatusChanged(currentPrivacyWebEngineViewPointer->ultraPrivacyEnabled);
emit updateDefaultZoomFactor(currentPrivacyWebEngineViewPointer->defaultZoomFactor);
emit updateDomainSettingsIndicator(currentPrivacyWebEngineViewPointer->domainSettingsName != QLatin1String(""));
emit updateJavaScriptAction(currentWebEngineSettingsPointer->testAttribute(QWebEngineSettings::JavascriptEnabled));
DevToolsWebEngineView *devToolsWebEngineViewPointer = qTabWidgetPointer->currentWidget()->findChild<DevToolsWebEngineView *>();
// Update the actions.
- emit blockedRequestsUpdated(currentPrivacyWebEngineViewPointer->blockedRequests);
+ emit easyListStatusChanged(currentPrivacyWebEngineViewPointer->easyListEnabled);
+ emit easyPrivacyStatusChanged(currentPrivacyWebEngineViewPointer->easyPrivacyEnabled);
+ emit fanboysAnnoyanceListStatusChanged(currentPrivacyWebEngineViewPointer->fanboysAnnoyanceListEnabled);
+ emit ultraListStatusChanged(currentPrivacyWebEngineViewPointer->ultraListEnabled);
+ emit ultraPrivacyStatusChanged(currentPrivacyWebEngineViewPointer->ultraPrivacyEnabled);
+ emit blockedRequestsUpdated(currentPrivacyWebEngineViewPointer->blockedRequestsVector);
emit cookiesChanged(currentPrivacyWebEngineViewPointer->cookieListPointer->size());
- emit updateDefaultZoomFactor(currentPrivacyWebEngineViewPointer->defaultZoomFactor);
emit updateBackAction(currentWebEngineHistoryPointer->canGoBack());
+ emit updateDefaultZoomFactor(currentPrivacyWebEngineViewPointer->defaultZoomFactor);
emit updateDeveloperToolsAction(devToolsWebEngineViewPointer->isVisible());
emit updateDomStorageAction(currentWebEngineSettingsPointer->testAttribute(QWebEngineSettings::LocalStorageEnabled));
emit updateForwardAction(currentWebEngineHistoryPointer->canGoForward());
// Show the dialog.
saveFileDialogPointer->show();
}
+