mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
PyQt 5.7 compatibility fix
This commit is contained in:
parent
343fa0148d
commit
0e11f80cf6
@ -9,8 +9,7 @@ __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
|||||||
import sys
|
import sys
|
||||||
from collections import defaultdict, deque
|
from collections import defaultdict, deque
|
||||||
|
|
||||||
from PyQt5.Qt import (
|
from PyQt5.Qt import QTextCursor, QTextBlockUserData, QTextLayout, QTimer
|
||||||
QTextCursor, pyqtSlot, QTextBlockUserData, QTextLayout, QTimer)
|
|
||||||
|
|
||||||
from ..themes import highlight_to_char_format
|
from ..themes import highlight_to_char_format
|
||||||
from calibre.gui2.tweak_book.widgets import BusyCursor
|
from calibre.gui2.tweak_book.widgets import BusyCursor
|
||||||
@ -124,7 +123,6 @@ class SyntaxHighlighter(object):
|
|||||||
new_data = True
|
new_data = True
|
||||||
return ud, new_data
|
return ud, new_data
|
||||||
|
|
||||||
@pyqtSlot(int, int, int)
|
|
||||||
def reformat_blocks(self, position, removed, added):
|
def reformat_blocks(self, position, removed, added):
|
||||||
doc = self.doc
|
doc = self.doc
|
||||||
if doc is None or self.ignore_requests or not hasattr(self, 'state_map'):
|
if doc is None or self.ignore_requests or not hasattr(self, 'state_map'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user