From bf03d375e0c47692690c0efd4edf93c71c74c540 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Sun, 12 Jun 2022 13:52:36 +0800 Subject: [PATCH] fix: clear cookies when click the Reset button --- GPClient/gpclient.cpp | 2 +- GPClient/gphelper.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/GPClient/gpclient.cpp b/GPClient/gpclient.cpp index 124d2fa..9bd7837 100644 --- a/GPClient/gpclient.cpp +++ b/GPClient/gpclient.cpp @@ -112,7 +112,7 @@ void GPClient::initSystemTrayIcon() connectAction = contextMenu->addAction(QIcon::fromTheme("preferences-system-network"), "Connect", this, &GPClient::doConnect); contextMenu->addMenu(gatewaySwitchMenu); contextMenu->addSeparator(); - clearAction = contextMenu->addAction(QIcon::fromTheme("edit-clear"), "Reset Settings", this, &GPClient::clearSettings); + clearAction = contextMenu->addAction(QIcon::fromTheme("edit-clear"), "Reset", this, &GPClient::clearSettings); quitAction = contextMenu->addAction(QIcon::fromTheme("application-exit"), "Quit", this, &GPClient::quit); systemTrayIcon->show(); diff --git a/GPClient/gphelper.cpp b/GPClient/gphelper.cpp index 027840d..08a5152 100644 --- a/GPClient/gphelper.cpp +++ b/GPClient/gphelper.cpp @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include "gphelper.h" @@ -127,4 +129,6 @@ void gpclient::helper::settings::clear() _settings->remove(key); } } + + QWebEngineProfile::defaultProfile()->cookieStore()->deleteAllCookies(); }