X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fdialogs%2FCookiesDialog.cpp;h=4ca8c1c63a937c027923fafafec90e1d89b63e98;hb=e715eca23297fb10dcf70e4c8bb2712413d16e3d;hp=4e85efe4d112f9bbf35e34121b34fd3a58af8e61;hpb=ab3422aabe802b11f4ddf32df6a2a33e1fff9c96;p=PrivacyBrowserPC.git diff --git a/src/dialogs/CookiesDialog.cpp b/src/dialogs/CookiesDialog.cpp index 4e85efe..4ca8c1c 100644 --- a/src/dialogs/CookiesDialog.cpp +++ b/src/dialogs/CookiesDialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright © 2022 Soren Stoutner . + * Copyright 2022-2023 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -65,7 +65,7 @@ bool cookieSortPredicate(const QNetworkCookie &leftHandCookie, const QNetworkCoo QString leftHandThirdLevelDomain; QString rightHandThirdLevelDomain; - // Get the numer of dots in the strings. + // Get the number of dots in the strings. int leftHandDots = leftHandDomain.count(QLatin1Char('.')); int rightHandDots = rightHandDomain.count(QLatin1Char('.')); @@ -154,7 +154,7 @@ CookiesDialog::CookiesDialog(std::list *originalCookieListPointe treeModelPointer->horizontalHeaderItem(0)->setToolTip(i18nc("The cookie Name tool tip.", "The name identifies the cookie. Each cookie has a unique combination of domain, name, and path.")); treeModelPointer->horizontalHeaderItem(1)->setToolTip(i18nc("The cookie Durable tool tip", - "Durable cookies pursist across restarts, irrespective of the expiration date. All other cookies are deleted when Privacy Browser closes, irrespective of the expiration date.")); + "Durable cookies persist across restarts, irrespective of the expiration date. All other cookies are deleted when Privacy Browser closes, irrespective of the expiration date.")); treeModelPointer->horizontalHeaderItem(2)->setToolTip(i18nc("The cookie Path tool tip.", "Websites can restrict cookie access to subpath of their URL.")); treeModelPointer->horizontalHeaderItem(3)->setToolTip(i18nc("The cookie Expiration Date tool tip.", "Cookies without an expiration date are known as session cookies and are expected to be deleted every time the browser closes.")); @@ -202,11 +202,11 @@ CookiesDialog::CookiesDialog(std::list *originalCookieListPointe // Create the cookie items. QStandardItem *nameItemPointer = new QStandardItem(QString(cookie.name())); - QStandardItem *durableItemPointer = new QStandardItem(QString(isDurable ? i18n("yes") : i18n("no"))); - QStandardItem *pathItemPointer = new QStandardItem(QString(cookie.path())); - QStandardItem *expirationDateItemPointer = new QStandardItem(QString(cookie.expirationDate().toString())); - QStandardItem *isHttpOnlyItemPointer = new QStandardItem(QString(cookie.isHttpOnly() ? i18n("yes") : i18n("no"))); - QStandardItem *isSecureItemPointer = new QStandardItem(QString(cookie.isSecure() ? i18n("yes") : i18n("no"))); + QStandardItem *durableItemPointer = new QStandardItem(isDurable ? i18n("yes") : i18n("no")); + QStandardItem *pathItemPointer = new QStandardItem(cookie.path()); + QStandardItem *expirationDateItemPointer = new QStandardItem(cookie.expirationDate().toString()); + QStandardItem *isHttpOnlyItemPointer = new QStandardItem(cookie.isHttpOnly() ? i18n("yes") : i18n("no")); + QStandardItem *isSecureItemPointer = new QStandardItem(cookie.isSecure() ? i18n("yes") : i18n("no")); QStandardItem *valueItemPointer = new QStandardItem(QString(cookie.value())); // Populate the cookie standard item list. @@ -231,7 +231,7 @@ CookiesDialog::CookiesDialog(std::list *originalCookieListPointe // Don't elide the Value field (or any other field). treeViewPointer->setTextElideMode(Qt::ElideNone); - // Indicate that all the rows are the same height, wich improves performance. + // Indicate that all the rows are the same height, which improves performance. treeViewPointer->setUniformRowHeights(true); // Disable editing in the tree view. @@ -259,7 +259,7 @@ CookiesDialog::CookiesDialog(std::list *originalCookieListPointe QDialogButtonBox::ActionRole); // Set the button icons. - durableCookiesButtonPointer->setIcon(QIcon::fromTheme("view-visible")); + durableCookiesButtonPointer->setIcon(QIcon::fromTheme("view-visible", QIcon::fromTheme(QLatin1String("appointment-new")))); // Connect the buttons. connect(addCookieButtonPointer, SIGNAL(clicked()), this, SLOT(showAddCookieDialog()));