This commit is contained in:
Kovid Goyal 2014-06-24 19:24:18 +05:30
parent bf24620e5f
commit 87d2e742ad
3 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
__license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
from PyQt4.Qt import QTextCharFormat
from PyQt5.Qt import QTextCharFormat
from calibre.ebooks.oeb.base import OEB_DOCS, OEB_STYLES
from calibre.ebooks.oeb.polish.container import guess_type

View file

@ -567,7 +567,7 @@ def tag_ok_for_spell(self, name):
def profile():
import sys
from PyQt4.Qt import QTextDocument
from PyQt5.Qt import QTextDocument
from calibre.gui2 import Application
from calibre.gui2.tweak_book import set_book_locale
from calibre.gui2.tweak_book.editor.themes import get_theme

View file

@ -582,8 +582,8 @@ def spellcheck_locale_for_cursor(self, c):
formats = self.highlighter.parse_single_block(c.block())[0]
pos = c.positionInBlock()
for r in formats:
if r.start <= pos < r.start + r.length and r.format.property(SPELL_PROPERTY).toBool():
return r.format.property(SPELL_LOCALE_PROPERTY).toPyObject()
if r.start <= pos < r.start + r.length and r.format.property(SPELL_PROPERTY):
return r.format.property(SPELL_LOCALE_PROPERTY)
def recheck_word(self, word, locale):
c = self.textCursor()