mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround for AJAX breakage on Qt 5.13.2
Fixes #1850975 [qt5-webengine 5.13.2 breaks ebook-viewer](https://bugs.launchpad.net/calibre/+bug/1850975)
This commit is contained in:
parent
8b7b9427bd
commit
6cccd18be8
@ -102,6 +102,9 @@ def ajax(path, on_complete, on_progress=None, bypass_cache=True, method='GET', q
|
||||
is_network_error = ev if end_type is 'error' else False
|
||||
if xhr.status is not ok_code and end_type is 'load':
|
||||
end_type = 'error'
|
||||
if xhr.status is ok_code and end_type is 'error':
|
||||
# this apparently happens on Qt 5.13.2
|
||||
end_type = 'load'
|
||||
if end_type is not 'load':
|
||||
set_error(end_type, is_network_error)
|
||||
on_complete(end_type, xhr, ev)
|
||||
|
Loading…
x
Reference in New Issue
Block a user