From 0de3b5460e5e3f46384309bcff45a096b9fef740 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 4 Apr 2017 08:24:50 +0200 Subject: [PATCH] Only disable the cache on Qt 5.7.1 I ended up bisecting it, and https://codereview.qt-project.org/#/c/153977/ causes this, which is not in 5.7.0. --- qutebrowser/browser/webkit/cache.py | 2 +- tests/unit/browser/webkit/test_cache.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser/webkit/cache.py b/qutebrowser/browser/webkit/cache.py index 4e09844cc..8bbb8f812 100644 --- a/qutebrowser/browser/webkit/cache.py +++ b/qutebrowser/browser/webkit/cache.py @@ -54,7 +54,7 @@ class DiskCache(QNetworkDiskCache): if size is None: size = 1024 * 1024 * 50 # default from QNetworkDiskCachePrivate # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-59909 - if qtutils.version_check('5.7'): # pragma: no cover + if qtutils.version_check('5.7.1'): # pragma: no cover size = 0 self.setMaximumCacheSize(size) diff --git a/tests/unit/browser/webkit/test_cache.py b/tests/unit/browser/webkit/test_cache.py index 8d3f2a99b..ea2473949 100644 --- a/tests/unit/browser/webkit/test_cache.py +++ b/tests/unit/browser/webkit/test_cache.py @@ -25,9 +25,9 @@ from qutebrowser.browser.webkit import cache from qutebrowser.utils import qtutils -pytestmark = pytest.mark.skipif(qtutils.version_check('5.7'), +pytestmark = pytest.mark.skipif(qtutils.version_check('5.7.1'), reason="QNetworkDiskCache is broken on Qt >= " - "5.7") + "5.7.1") def preload_cache(cache, url='http://www.example.com/', content=b'foobar'):