diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ProfileEditor/forms/profileview.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/ProfileEditor/forms/profileview.cpp b/plugins/ProfileEditor/forms/profileview.cpp index f2e74ad..7ab8d39 100644 --- a/plugins/ProfileEditor/forms/profileview.cpp +++ b/plugins/ProfileEditor/forms/profileview.cpp @@ -71,6 +71,9 @@ ProfileView::ProfileView(WebProfile *profile, QWidget *parent) // cookies tab loadCookies(profile->cookieStore()); + for(const auto &c : profile->cookies()) { + cookieAdded(c); + } } ProfileView::~ProfileView() @@ -129,11 +132,13 @@ void ProfileView::loadCookies(QWebEngineCookieStore *store) }); connect(ui->cookies_delete, &QPushButton::clicked, store, [=]() { - auto index = ui->cookies->currentRow(); - auto cookie = ui->cookies->item(index, 0)->data(Qt::UserRole).value<QNetworkCookie>(); - store->deleteCookie(cookie); + for(auto *item : ui->cookies->selectedItems()) { + if(item->column() == 0) { + auto cookie = item->data(Qt::UserRole).value<QNetworkCookie>(); + store->deleteCookie(cookie); + } + } }); - } void ProfileView::cookieAdded(const QNetworkCookie &cookie) |