Reenable QtWebKit cache with Qt 5.9.

This was fixed here:
https://codereview.qt-project.org/#/c/190818/

See #2427
This commit is contained in:
Florian Bruhin 2017-04-24 12:22:19 +02:00
parent 1539301d64
commit 11c026bf4c
3 changed files with 7 additions and 6 deletions

View File

@ -43,8 +43,8 @@ Changed
- PAC on QtWebKit now supports SOCKS5 as type.
- Comments in the config file are now before the individual
options instead of being before sections.
- The HTTP cache is disabled with QtWebKit on Qt 5.8 now as it leads to frequent
crashes due to a Qt bug.
- The HTTP cache is disabled with QtWebKit on Qt 5.7.1 and 5.8 now as it leads
to frequent crashes due to a Qt bug.
- stdin is now closed immediately for processes spawned from qutebrowser
- When ui -> message-timeout is set to 0, messages are now never cleared.

View File

@ -54,7 +54,8 @@ 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.1'): # pragma: no cover
if (qtutils.version_check('5.7.1') and # pragma: no cover
not qtutils.version_check('5.9')):
size = 0
self.setMaximumCacheSize(size)

View File

@ -25,9 +25,9 @@ from qutebrowser.browser.webkit import cache
from qutebrowser.utils import qtutils
pytestmark = pytest.mark.skipif(qtutils.version_check('5.7.1'),
reason="QNetworkDiskCache is broken on Qt >= "
"5.7.1")
pytestmark = pytest.mark.skipif(
qtutils.version_check('5.7.1') and not qtutils.version_check('5.9'),
reason="QNetworkDiskCache is broken on Qt 5.7.1 and 5.8")
def preload_cache(cache, url='http://www.example.com/', content=b'foobar'):