mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PyQt 5.5 compatibility
This commit is contained in:
parent
66aae13cd7
commit
ee0931ee67
@ -822,6 +822,8 @@ class DocumentView(QWebView): # {{{
|
|||||||
|
|
||||||
def do_search_online(self, text):
|
def do_search_online(self, text):
|
||||||
url = self.document.search_online_url.replace('{text}', QUrl().toPercentEncoding(text))
|
url = self.document.search_online_url.replace('{text}', QUrl().toPercentEncoding(text))
|
||||||
|
if not isinstance(url, bytes):
|
||||||
|
url = url.encode('utf-8')
|
||||||
open_url(QUrl.fromEncoded(url))
|
open_url(QUrl.fromEncoded(url))
|
||||||
|
|
||||||
def set_manager(self, manager):
|
def set_manager(self, manager):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user