From ed7c48decab200412b77da322ba319830ae5d000 Mon Sep 17 00:00:00 2001 From: rmg-x Date: Sat, 4 Jan 2025 11:30:54 -0600 Subject: [PATCH] UI/Qt: Add menu action to clear all cookies --- UI/Qt/BrowserWindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UI/Qt/BrowserWindow.cpp b/UI/Qt/BrowserWindow.cpp index 080011f3946a..aaa3f0e2c504 100644 --- a/UI/Qt/BrowserWindow.cpp +++ b/UI/Qt/BrowserWindow.cpp @@ -480,6 +480,12 @@ BrowserWindow::BrowserWindow(Vector const& initial_urls, IsPopupWindow debug_request("clear-cache"); }); + auto* clear_all_cookies_action = new QAction("Clear all Cookies", this); + debug_menu->addAction(clear_all_cookies_action); + QObject::connect(clear_all_cookies_action, &QAction::triggered, this, [] { + WebView::Application::cookie_jar().clear_all_cookies(); + }); + auto* spoof_user_agent_menu = debug_menu->addMenu("Spoof &User Agent"); spoof_user_agent_menu->setIcon(load_icon_from_uri("resource://icons/16x16/spoof.png"sv));