From 23d031b1da60e5cf7a36ec2d5fd9affbc9fd4989 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 2 Nov 2017 15:08:38 +0100 Subject: [PATCH] kio: fix handling of KCookieAdvice::AcceptForSession Commit 23874cab9d broke the handling of KCookieAdvice::AcceptForSession because strToAdvice(adviceToStr(KCookieAdvice::AcceptForSession)) now returns KCookieAdvice::Dunno. Ignore spaces in the argument of strToAdvice to properly recognize the AcceptForSession setting and restore compatibility with previous configs. BUG: 386325 Differential Revision: https://phabricator.kde.org/D8545 --- src/kcms/kio/kcookiespolicyselectiondlg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kcms/kio/kcookiespolicyselectiondlg.h b/src/kcms/kio/kcookiespolicyselectiondlg.h index 5efb7dad..7ee90245 100644 --- a/src/kcms/kio/kcookiespolicyselectiondlg.h +++ b/src/kcms/kio/kcookiespolicyselectiondlg.h @@ -49,7 +49,7 @@ public: if (_str.isEmpty()) return KCookieAdvice::Dunno; - QString advice = _str.toLower(); + QString advice = _str.toLower().remove(' '); if (advice == QLatin1String ("accept")) return KCookieAdvice::Accept; -- 2.13.6