diff options
author | Stefan Strogin <steils@gentoo.org> | 2020-05-27 19:13:16 +0300 |
---|---|---|
committer | Stefan Strogin <steils@gentoo.org> | 2020-05-27 19:17:25 +0300 |
commit | 1ea73a813f311897ff6ed9fe4bdceaf36bb24213 (patch) | |
tree | a5c51b28d06fe2c60774dd92b900759eabc7d916 /www-client | |
parent | dev-lang/qu-prolog: EAPI 7 fixup (diff) | |
download | gentoo-1ea73a813f311897ff6ed9fe4bdceaf36bb24213.tar.gz gentoo-1ea73a813f311897ff6ed9fe4bdceaf36bb24213.tar.bz2 gentoo-1ea73a813f311897ff6ed9fe4bdceaf36bb24213.zip |
www-client/qutebrowser: add patch to fix session breakage with Qt 5.15
See also: https://github.com/qutebrowser/qutebrowser/issues/5359
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Stefan Strogin <steils@gentoo.org>
Diffstat (limited to 'www-client')
-rw-r--r-- | www-client/qutebrowser/files/qutebrowser-1.11.1-session-restore.patch | 45 | ||||
-rw-r--r-- | www-client/qutebrowser/qutebrowser-1.11.1-r1.ebuild (renamed from www-client/qutebrowser/qutebrowser-1.11.1.ebuild) | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/www-client/qutebrowser/files/qutebrowser-1.11.1-session-restore.patch b/www-client/qutebrowser/files/qutebrowser-1.11.1-session-restore.patch new file mode 100644 index 000000000000..060c94eee6b4 --- /dev/null +++ b/www-client/qutebrowser/files/qutebrowser-1.11.1-session-restore.patch @@ -0,0 +1,45 @@ +From 22e15acc1e617174a9fde3e53100a1b71ca7f462 Mon Sep 17 00:00:00 2001 +From: Florian Bruhin <me@the-compiler.org> +Date: Tue, 26 May 2020 16:48:00 +0200 +Subject: [PATCH] Update Qt 5.15 session workaround for lazy_restore + +See #5359 + +(cherry picked from commit 093a454bf4e386eda8715bc3ea2b217760d5f070) +Upstream-Status: Accepted +[https://github.com/qutebrowser/qutebrowser/commit/093a454bf4e386eda8715bc3ea2b217760d5f070 +expected in v1.12.0] +--- + qutebrowser/browser/webengine/webenginetab.py | 6 +++++- + qutebrowser/html/warning-sessions.html | 1 + + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py +index 647fa60abc..f61404f4ea 100644 +--- a/qutebrowser/browser/webengine/webenginetab.py ++++ b/qutebrowser/browser/webengine/webenginetab.py +@@ -648,7 +648,11 @@ def load_items(self, items): + if qtutils.version_check('5.15', compiled=False): + # WORKAROUND for https://github.com/qutebrowser/qutebrowser/issues/5359 + if items: +- self._tab.load_url(items[-1].url) ++ url = items[-1].url ++ if ((url.scheme(), url.host()) == ('qute', 'back') and ++ len(items) >= 2): ++ url = items[-2].url ++ self._tab.load_url(url) + return + + if items: +diff --git a/qutebrowser/html/warning-sessions.html b/qutebrowser/html/warning-sessions.html +index f93971c6ab..dd0c4127b6 100644 +--- a/qutebrowser/html/warning-sessions.html ++++ b/qutebrowser/html/warning-sessions.html +@@ -15,6 +15,7 @@ <h1>{{ title }}</h1> + + <ul> + <li>Loading a session with this release will <b>only load the most recently opened page</b> for every tab. As a result, the back/forward-history of every tab <b>will be lost</b> as soon as the session is saved again.</li> ++ <li>Due to that, the <span class="mono">session.lazy_restore</span> setting does not have any effect.</li> + <li>A one-time backup of the session folder has been created at <span class="mono">{{ datadir }}{{ sep }}sessions{{ sep }}before-qt-515</span>.</li> + </ul> + diff --git a/www-client/qutebrowser/qutebrowser-1.11.1.ebuild b/www-client/qutebrowser/qutebrowser-1.11.1-r1.ebuild index aa75aa620455..2cfc68ac7db0 100644 --- a/www-client/qutebrowser/qutebrowser-1.11.1.ebuild +++ b/www-client/qutebrowser/qutebrowser-1.11.1-r1.ebuild @@ -38,6 +38,8 @@ distutils_enable_tests setup.py # isn't complete and X11 is required in order to start up qutebrowser. RESTRICT="test" +PATCHES=( "${FILESDIR}"/${P}-session-restore.patch ) + python_compile_all() { a2x -f manpage doc/${PN}.1.asciidoc || die "Failed generating man page" } |