From cb8b181daa117d2929baef6dd871d3717ae69941 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Nov 2019 07:19:46 +0530 Subject: [PATCH] Add a note to not change the viewer user agent --- src/calibre/gui2/viewer/web_view.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/viewer/web_view.py b/src/calibre/gui2/viewer/web_view.py index c860654b06..63158d826e 100644 --- a/src/calibre/gui2/viewer/web_view.py +++ b/src/calibre/gui2/viewer/web_view.py @@ -211,6 +211,8 @@ def create_profile(): if ans is None: ans = QWebEngineProfile(QApplication.instance()) osname = 'windows' if iswindows else ('macos' if isosx else 'linux') + # DO NOT change the user agent as it is used to workaround + # Qt bugs see workaround_qt_bug() in ajax.pyj ua = 'calibre-viewer {} {}'.format(__version__, osname) ans.setHttpUserAgent(ua) if is_running_from_develop: