From b7cdea8805c11891191cc7de8dcdfec723a54eb2f50fb03041c2cc1a71b8b3f7 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Fri, 3 Nov 2017 06:08:14 +0000 Subject: [PATCH] Accepting request 538401 from home:wolfi323:test - Add fix-handling-of-KCookieAdvice_AcceptForSession.patch to fix the "Accept For Session" cookie setting that was not properly respected (boo#1049975, kde#386325) OBS-URL: https://build.opensuse.org/request/show/538401 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=203 --- ...ng-of-KCookieAdvice_AcceptForSession.patch | 34 +++++++++++++++++++ kio.changes | 7 ++++ kio.spec | 3 ++ 3 files changed, 44 insertions(+) create mode 100644 fix-handling-of-KCookieAdvice_AcceptForSession.patch diff --git a/fix-handling-of-KCookieAdvice_AcceptForSession.patch b/fix-handling-of-KCookieAdvice_AcceptForSession.patch new file mode 100644 index 0000000..0f88d12 --- /dev/null +++ b/fix-handling-of-KCookieAdvice_AcceptForSession.patch @@ -0,0 +1,34 @@ +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 + diff --git a/kio.changes b/kio.changes index fc18b7f..4825e46 100644 --- a/kio.changes +++ b/kio.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Nov 2 14:13:08 UTC 2017 - wbauer@tmo.at + +- Add fix-handling-of-KCookieAdvice_AcceptForSession.patch to + fix the "Accept For Session" cookie setting that was not properly + respected (boo#1049975, kde#386325) + ------------------------------------------------------------------- Mon Oct 23 06:41:41 CEST 2017 - lbeltrame@kde.org diff --git a/kio.spec b/kio.spec index 9cf55f2..f4453ad 100644 --- a/kio.spec +++ b/kio.spec @@ -79,6 +79,8 @@ Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-% Source1: baselibs.conf # PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5 Patch0: kio_help-fallback-to-kde4-docs.patch +# PATCH-FIX-UPSTREAM +Patch1: fix-handling-of-KCookieAdvice_AcceptForSession.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -125,6 +127,7 @@ Development files. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %cmake_kf5 -d build