PyQt 5.7 compatibility fix

This commit is contained in:
Kovid Goyal 2016-08-23 07:36:14 +05:30
parent 343fa0148d
commit 0e11f80cf6

View File

@ -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'):