From c3d0fc0e0ebbd27fd54b4dcbad4bce1fafe48cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikalai=20Ahnio=C5=AD?= Date: Fri, 17 Apr 2020 17:26:06 +0300 Subject: [PATCH] Correct the sorting for cookies white- and black- lists The previous solution has no effect on entries which already exist in the lists. As a result the lists are not sorted. It is only functional when the lists were initially empty, which is a sub-optimal case. Test plan: open Cookies Manager, switch to Cookie Filtering tab, see the items being alphabetically sorted --- src/lib/cookies/cookiemanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/cookies/cookiemanager.cpp b/src/lib/cookies/cookiemanager.cpp index b6866f0a9..cfc613428 100644 --- a/src/lib/cookies/cookiemanager.cpp +++ b/src/lib/cookies/cookiemanager.cpp @@ -85,8 +85,8 @@ CookieManager::CookieManager(QWidget *parent) ui->cookieTree->header()->setDefaultSectionSize(220); ui->cookieTree->setFocus(); - ui->whiteList->setSortingEnabled(true); - ui->blackList->setSortingEnabled(true); + ui->whiteList->sortItems(Qt::AscendingOrder); + ui->blackList->sortItems(Qt::AscendingOrder); QShortcut* removeShortcut = new QShortcut(QKeySequence("Del"), this); connect(removeShortcut, &QShortcut::activated, this, &CookieManager::deletePressed);