mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround for pyqtSlot not accepting QList<int> on windows
This commit is contained in:
parent
4af671be80
commit
42f2e6cff5
Binary file not shown.
@ -95,7 +95,7 @@ class PreviewIntegration
|
||||
loc.push(num)
|
||||
parent = parent.parentNode
|
||||
loc.reverse()
|
||||
window.py_bridge.request_split(loc)
|
||||
window.py_bridge.request_split(JSON.stringify(loc))
|
||||
|
||||
onload: () =>
|
||||
window.document.body.addEventListener('click', this.onclick, true)
|
||||
|
@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import time, textwrap
|
||||
import time, textwrap, json
|
||||
from bisect import bisect_right
|
||||
from base64 import b64encode
|
||||
from future_builtins import map
|
||||
@ -319,9 +319,10 @@ class WebPage(QWebPage):
|
||||
except (TypeError, ValueError, OverflowError, AttributeError):
|
||||
pass
|
||||
|
||||
@pyqtSlot('QList<int>')
|
||||
@pyqtSlot(str)
|
||||
def request_split(self, loc):
|
||||
actions['split-in-preview'].setChecked(False)
|
||||
loc = json.loads(unicode(loc))
|
||||
if not loc:
|
||||
return error_dialog(self.view(), _('Invalid location'),
|
||||
_('Cannot split on the body tag'), show=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user