mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
bf24620e5f
commit
87d2e742ad
@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
||||
__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
|
||||
|
@ -567,7 +567,7 @@ class XMLHighlighter(HTMLHighlighter):
|
||||
|
||||
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
|
||||
|
@ -582,8 +582,8 @@ class TextEdit(PlainTextEdit):
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user